开发者

The java class is not found in JDK 5 environment .. not in JDK 6

I de开发者_StackOverflow社区veloped one stand-alone distributable JAR file using NetBeans 6.9 IDE.My application works fine in JDK 1.6 environement. But, in JDK 1.5 I get error "The java class is not found: .". Please suggest what could have gone wrong.In JDK 5 environment java bin path is present in PATH variable.


THe problem is that you use some class, which has been added in java 1.6. If you want to run your code on java 1.5 you can't use this new class. So, you have choice:

  1. Restrict your users from using java 1.5

  2. Rewrite your code only using JDK 5.


Java 6 class files are not compatible with Java 5.

In your IDE, you need to set the "target" option to "Java 5" to force the compiler to create Java 5 compatible class files (which will also work in Java 6).

[EDIT] It's also possible that you used a class which is only available in Java 6. Please edit your question and show us the complete error message.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜