Updating .class file in a jar throws exception
Posted
by CheesePls
on Stack Overflow
See other posts from Stack Overflow
or by CheesePls
Published on 2010-06-03T18:45:06Z
Indexed on
2010/06/03
18:54 UTC
Read the original article
Hit count: 208
I'm trying to port a wikimedia plugin to run on OpenVMS and needed to alter a class. I'm trying to update the .class file in the jar using jar uf jar-file .class-file
, however when I do this I get the following:
java.util.zip.ZipException: duplicate entry: META-INF/LICENSE.txt
at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)
at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:90)
at sun.tools.jar.Main.update(Main.java:507)
at sun.tools.jar.Main.run(Main.java:184)
It turns out there are 2 LICENSE.txt files in the jar and I can't seem to get rid of them.
Any ideas on how to just get the new .class file into the jar or how to get rid of the duplicate file?
© Stack Overflow or respective owner