i got a problem. i used FatJar to create an executable jar of my project. but i always get the same error:

SCHWERWIEGENd: Exception in game loop

java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

i already searched the forum and there is one thread with the same problem, but no actual solution. doesn anybody lnow how to fix that??

i start my jar in the command line using

java -jar myjar.jar

thx for help!


yes but where should i put that?

its a parameter to java, so after -jar for example.

java -jar -Djava.library.path=./lib/lwjgl/native/win32 yourjar.jar

I don't think you can have the native library inside the jar, but i'm not sure

ok thx. but how do i now the path to my lwjgl library?? isnt that the lwjgl.jar which came with jme?

No, this about the .dll .so and .jnilib files. FatJar does not support that type of file so you'll have to supply them alongside the jar. If you place them in the same directory as the jar itself, you can often even ommit the "-Djava.library.path=./lib/lwjgl/native/win32" line (so you can just doubleclick the jar to open it in many OSs)

so then i just have to find somewhere the lwjgl.dll file and copy it into the same directory??

and this lwjgl.dll file is somewhere in my os?

It's included in the jME SVN or CVS repos (somewhere in the lib directory).

ah nice i got it! now it works.

just one final question:

how is this working on other platforms? as far as i know there aren't any dlls

See my earlier post for which extentions to look for.

ok i think it lwjgl.jnilib :wink:

but theres only a file liblwjgl.jnilib

That would be it…

Sebastian23 said:

ah nice i got it! now it works.

just one final question:
how is this working on other platforms? as far as i know there aren't any dlls

Simply, maybee not best solution, copy all other antive files into the same directory as well, so each Os should be able to find the ones belong to it.

thats what I would do, just to get it done…


now it works perfectly with windows. but on mac os the following exception is thrown:

java.lang.UnsupportedClassVersionError: Bad version number in .class file
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:675)
     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java: 
     at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
     at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374)

can anybody explain this? i read in google that this is something with the jDK used for compiling but i didn0t understand these things :S

greets seb.

Is it because it was compiled using java 1.6 and 32 bit MACs only support 1.5?