`

Duplicate name in Manifest: Depends-On

 
阅读更多

解决方法:http://ww2.sjc.edu/faculty_pages/hzhou/javaBugSolutions.html

Solutions to Encountered Bugs

I have been fixing some bugs in Java but never wrote down how.  Since now I am  teaching Java programming language, so I would like to record how bugs encountered are fixed.

1.    When you are running JDK5.0, you may see warning message when using javac:

java.util.jar.Attributes read
WARNING: Duplicate name in Manifest: Depends-On

 

This problem may be caused by different reasons.  Some people claimed that it was caused some jar files which contain 'bad' manifest file(s) in the jar package and the manifest file(s) may contain duplicate classpath specification.  When I met this problem and after reading the explanation of other java professionals, I did a little bit different.

First, I checked the system classpath.  Under Windows, 'echo %CLASSPATH%'; under Linux/Unix, 'echo $CLASSPATH'.   I found that I have some old version of java that is in the classpath, such as VisualCafe.  I suspect that this is the problem.  Then I cleaned the classpath, and then everything works fine.  (On our lab computers, I asked students to set the classpath to be ".\" to clear out any existing content since we do not have other libraries to refer to).

How to modify the CLASSPATH? 

  • Under window, go to Control Panel --> System --> Advanced --> Environment Variables --> Edit the Classpath.
  • Under Linux, modify your .bashrc or .zshrc or related profile.

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics