jMonkey in with JDK 1.7x

I’ve been using JDK1.6.0_20 for jMonkey development in both Netbeans and Eclipse. I recently upgraded to JDK 1.7.0_01 and JDK 1.7.0_2 and none of my jMonkey files compile. I get the following error:



[java]WARNING: Cannot locate native library: linux/libbulletjme.so

Exception in thread “LWJGL Renderer Thread” java.lang.UnsatisfiedLinkError: /home/user/NetBeansProjects/jMEProject1/liblwjgl.so: libjawt.so: cannot open shared object file: No such file or directory

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1928)

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)

at java.lang.Runtime.load0(Runtime.java:792)

at java.lang.System.load(System.java:1059)

at org.lwjgl.Sys$1.run(Sys.java:70)

at java.security.AccessController.doPrivileged(Native Method)

at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)

at org.lwjgl.Sys.loadLibrary(Sys.java:95)

at org.lwjgl.Sys.<clinit>(Sys.java:112)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:199)

at java.lang.Thread.run(Thread.java:722)

BUILD SUCCESSFUL (total time: 1 second)[/java]



Even on JDK 1.6x I have always gotten the warning on the first line, but the files still compiled and ran. Now it won’t run the resulting file. I’ve tested with both JDK 1.7x platforms. I should note that the file “/home/user/NetBeansProjects/jMEProject1/liblwjgl.so” does exist, but I don’t know where “libjawt.so” might be. Any ideas?

well you probably do not have the native build with the right bitcount. (Installed a 54 bit vm and former was 32 or other way round)

I had downloaded the Netbeans7.0+JDK1.7 bundle for 32-bit x86 linux. Is there any way to fix it so I can use the new JDK?

This looks more like a classpath error than anything… Weird. Have you tried deleting the natives that have already been extracted?

@sbook said:
This looks more like a classpath error than anything.. Weird. Have you tried deleting the natives that have already been extracted?

I have all 3 JDKs installed, I have just been selecting between them when loading netbeans via the terminal using the ---jdk-home switch. What should I delete and where might they be located?

Downgrade to jdk 6 and problem solved xD.

The natives are those “.so” files you’re seeing referenced.

I deleted the .so files, restarted Netbeans yet I still get the same error.

@normen?

Are the .so files being extracted again after you delete them?

@normen said:
Are the .so files being extracted again after you delete them?

No, they are only recreated if I run JDK 1.6 again, but not when I run either of the JKD1.7 versions.

So those are not the files you look for, probably the extraction dir is use_home because java applications cannot write to the application dir under 1.7 or something.

I searched my whole computer for those filenames. I did find one of those files liblwjgl.so in my home folder and copied it to the project folder, but I still get the same error. I don’t think that was related to the new JDK. All the other ones found were in older project folders. I think I had at some point created a project within the home folder itself long ago which left it there.



Also, I started a new project from existing sources and imported the jMonkery libraries. This also gave the same error and did not work.

Apparently you aren’t the first to have problems in NetBeans with Java 7…



http://netbeans-org.1045718.n5.nabble.com/JDK-1-7-instability-in-Netbeans-7-0-1-td4765428.html

It is not only with netBeans 7, it acts the same when I use JDK1.7 in Netbeans 6.8 and 6.9 too… weird.