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.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值