I have a problem that I would have hoped not to make public, but a lesson in humility is always a good thing, so here goes:
I'm getting the following error in linux when I try to run anything in jME:
java.lang.UnsatisfiedLinkError: /programming/workspace/jme/lib/liblwjgl.so: /programming/workspace/jme/lib/liblwjgl.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:1751)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at org.lwjgl.Sys$1.run(Sys.java:67)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.Sys.<clinit>(Sys.java:65)
at org.lwjgl.opengl.Display.<clinit>(Display.java:104)
at com.jme.system.lwjgl.LWJGLPropertiesDialog.<init>(LWJGLPropertiesDialog.java:148)
at com.jme.app.AbstractGame.getAttributes(AbstractGame.java:191)
at com.jme.app.BaseGame.start(BaseGame.java:59)
at jmetest.base.TestSimpleGame.main(TestSimpleGame.java:50)
I can't figure out why this is happening as I've properly defined the java.library.path to point to /programming/workspace/jme/lib and it's obviously finding the file, and it is there, but this error is being thrown anyway. Can anyone set me straight?
Okay, I think it might have to do with the fact that I'm mounting a FAT32 partition and it's having issues dealing with that. I'm still looking into it, but I'm feeling less like a Sheep all the time. :-p
I should have explained that I'm trying to release Roll-A-Rama…that's why everything is breaking. :-p
Okay, I went ahead and built everything and dropped on my production server and now I'm getting this friendly error message:
SEVERE: Native code library failed to load: java.lang.UnsatisfiedLinkError: /home/mhicks/rr/lib/libodejava.so: libstdc++.so.5: cannot open shared object file: No such file or directory
Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: get_PARENTSPACEID_ZERO
at org.odejava.ode.OdeJNI.get_PARENTSPACEID_ZERO(Native Method)
at org.odejava.ode.Ode.getPARENTSPACEID_ZERO(Unknown Source)
at org.odejava.Space.<clinit>(Unknown Source)
at com.jmex.physics.PhysicsWorld.<init>(Unknown Source)
at com.jmex.physics.PhysicsWorld.create(Unknown Source)
at com.captiveimagination.jme.GameManager.initGame(GameManager.java:207) at com.captiveimagination.jme.GameManager.run(GameManager.java:331)
at java.lang.Thread.run(Thread.java:595)
Isn't libstdc++.so.5 one of those standard libraries that differs with the version of GCC you use? Maybe it's too new for a typical server oriented linuc distro (and by that I mean Debian). Either that or it's in the wrong path…
Me, I gave up on this path buisness and just put whatever dll/so/jnilib it asks for in the same directory that I launch the jar from (might solve the problem on your local machine).
Hi darkfrog, I think some security restirictions strike you.
From the man page of mount:
noexec Do not allow direct execution of any binaries on the
mounted file system. (Until recently it was possible to
run binaries anyway using a command like /lib/ld*.so
/mnt/binary. This trick fails since Linux 2.4.25 /
2.6.0.)
This option is default for vfat, nfs and some others.
You can find out which shared libraries a binary or a shared library needs with something like:
> ldd libjinput-linux.so
ldd: warning: you do not have execution permission for `./libjinput-linux.so'
linux-gate.so.1 => (0xffffe000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x4002a000)
libm.so.6 => /lib/tls/libm.so.6 (0x400e8000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4010e000)
libc.so.6 => /lib/tls/libc.so.6 (0x40119000)
/lib/ld-linux.so.2 (0x80000000)
If you're missing libstdc++.so most propably it shows unresolved with the command above and you have to find it in some package (I think there are some compatibility packages out there if you have a different version).
I've got my server running great, but on my machine when I try to execute the application I'm still getting, "cannot open shared object file" and when I execute:
and it should be somewhere where java can find it.
You can try to add the directory where this shared library is to /etc/ld.so.conf and execute ldconfig, but this is something the install program or a script to start the java vm should do. Find the library with: