Java – resolve “duplicate definition of library class” in Proguard

I have a java project that contains the Xerces library

When I process a project with Proguard, I receive a warning:

Note: duplicate deFinition of library class [org.w3c.dom.html.HTMLDOMImplementation]

I see that this class exists in Xerces, and the same class exists in rt.jar of JDK 1.6

The jar file created by Proguard could not be started (error: "a Java exception occurred") How can I solve this problem? thank you!

(Note: I work with NetBeans)

Solution

1) You should delete this class from a library (this is not advisable because it may destroy other classes)

2) Find a jar without this course For example, the classes you use in your application may be available in many cans So get the jar where the conflicting class does not exist, but the other classes you want exist (this may take some time)

3) (and best) just ignore mistakes I don't think it should give any questions According to the jar that appears first in the classpath, the class will be obtained

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>