Got back into Linux this morning and ran some tests using -Djava.library.path instead of setting the LD_LIBRARY_PATH environment variable. It appears to work exactly as you’ve said. Nice work.
That’s just it - I was suspicious of it not working exactly because it shouldn’t be my job. The library path is where java looks for native libs (including the lwjgl library), and lwjgl has nothing to do with the way the path is searched nor how the lib is loaded. Another thing would be the loading of the openal and gl library, which Matzon had to tweak to make it work with java.library.path.
But I’m glad it works.
- elias
I’ve seen some discussion on how to get LWJGL running under Linux. On my box running MDK 9.1 i just throw in all the so:s in the same dir as the app and then do a:
LD_LIBRARY_PATH = .
export LD_LIBRARY_PATH
java -cp lwjgl.jar MyCoolApp
Thats it!
You can set LD_LIBRARY_PATH to any path that points to the dynamic libs, not just ‘.’ If your system uses LD_LIBRARY_PATH a more gentle command might also be:
LD_LIBRARY_PATH = $LD_LIBRARY_PATH:/path/to/libs
export LD_LIBRARY_PATH
I usually just set up a shellscript with the above contents that run the above and then start the app.
Good Luck all Free people with Free OS:s 
Kalle
[quote]That’s just it - I was suspicious of it not working exactly because it shouldn’t be my job. The library path is where java looks for native libs (including the lwjgl library), and lwjgl has nothing to do with the way the path is searched nor how the lib is loaded. Another thing would be the loading of the openal and gl library, which Matzon had to tweak to make it work with java.library.path.
But I’m glad it works.
- elias
[/quote]
Oh my GOD. So in my new project I just tried to export to a jar and it didn’t work. Sigh. <----
So this is the low-down:
I’m typing this:
jar -cvmf MANIFEST.MF Blah.jar Blah.class
The MANIFEST looks like this:
Manifest-Version: 1.0
Main-Class: Blah
Class-Path: lwjgl.jar
and when I unjar it, the directory structure looks like this:
Blah.class
META-INF/MANIFEST.MF
the contents of the manifest are changed to this:
Manifest-Version: 1.0
Class-Path: lwjgl.jar
Created-By: 1.4.1_02 (Sun Microsystems Inc.)
Main-Class: Blah
Any ideas? I thought I had this problem snuffed but I guess not.
edit: for fun mabey i should say what the error message is?
just says main class not found