我正在尝试在JNI中加载Java类。我有一个用NetBeans编写和编译的测试类(尝试版本7和7.1.2)。我的C程序无法加载用NetBeans编译的测试类,但是,如果我使用javac编译相同的代码,则该类加载就很好。
我的系统上仅安装了一个版本的JDK。
我之前也做过同样的过程,并且一切正常。我最近重新安装了我的操作系统(Windows XP),并注意到这不起作用。有什么事吗
这是NetBeans编译时输出的内容:

> D:\atoMerz\jTest\build\built-jar.properties Created dir:
> D:\atoMerz\jTest\build\classes Created dir:
> D:\atoMerz\jTest\build\empty Created dir:
> D:\atoMerz\jTest\build\generated-sources\ap-source-output Compiling 1
> source file to D:\atoMerz\jTest\build\classes compile: Created dir:
> D:\atoMerz\jTest\dist Copying 1 file to D:\atoMerz\jTest\build Nothing
> to copy. Building jar: D:\atoMerz\jTest\dist\jTest.jar To run this
> application from the command line without Ant, try: java -jar
> "D:\atoMerz\jTest\dist\jTest.jar" jar: BUILD SUCCESSFUL (total time: 0
> seconds)

最佳答案

安装JDK 6解决了该问题。
但是我仍然不知道为什么它不能与JDK 7一起使用。

10-07 15:23