UnsatisfiedLinkError: no lwjgl in java.library.path

Hi!
Is someone using Slick and can make a executable jar?
If I start my game throught netbeans it run 100%.

Now I wanted to make a .jar.
But when I execute my .jar from the dist directory I get an error:
Exception in thread “main” java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

I found many threads on google but no real solution.
I put the lwjgl.dll in my lib directory an change the VM Path to that but still the error.

Had someone the same problem?

Hi

Why not using Java Web Start as you already have a JAR for your application and using a third party library like LWJGL only requires to add a single line into a JNLP file?

Have you read this?
http://slick.cokeandcode.com/wiki/doku.php?id=webstart

When you use Slick with Java Web Start, LWJGL is bundled with it, you don’t have to deploy it separately:

[quote]
[/quote]
Use the command “javaws” instead of “java -jar” to test your JNLP file.

I don’t know whether it is possible to create a fat JAR containing both your game, Slick and LWJGL. At a certain step, native libraries have to be unpacked (from the JAR), don’t they? You can put native libraries into a given directory and set the Java library path in order to tell the JVM where to find them.

http://lwjgl.com/wiki/index.php?title=Distributing_Your_LWJGL_Application

Look at bullets 1 and 2.

always a pain
I use the eclipse export thing, which works great - it puts the jars that you need wherever you want, inside the jar or not
then you still have to have a folder with all the lwjgl native files
and do -Djava.library.path=natives_folder

It won’t work on all platforms as you can set only a single path. Is it possible to bundle all native libraries of LWJGL into a JAR and use a mechanism of dynamic loading (able to extract native libraries and load them at runtime)?

Ive changed the manifest but it still wont work:

My game directory:
http://www.bilder-space.de/show_img.php?img=bae287-1326108110.png&size=original
lib directory:
http://www.bilder-space.de/show_img.php?img=dd7a73-1326108227.png&size=original
native directory:
http://www.bilder-space.de/show_img.php?img=5f889c-1326108252.png&size=original

my manifest:

[quote]Manifest-Version: 1.0
Main-Class: masterDestroyer.Main
Class-Path: lib/lwjgl.jar lib/slick.jar lib/jinput.jar lib/jogg-0.0.7.jar lib/jorbis-0.0.15.jar lib/NativeFmodDesigner.jar lib/NativeFmodDesigner-win.jar lib/NativeFmodDesigner-win64.jar lib/NativeFmodEx.jar lib/NativeFmodEx-win.jar lib/NativeFmod-win64.jar lib/libLibLoader.so lib/libLibLoader64.so lib/libNativeFmodDesigner.jnilib lib/libNativeFmodDesigner.so lib/libNativeFmodDesigner64.so lib/libNativeFmodEx.jnilib lib/libNativeFmodEx.so lib/libNativeFmodEx64.so natives/lwjgl.dll natives/jinput-dx8.dll natives/OpenAL32.dll natives/jinput-dx_64.dll natives/jinput-raw.dll natives/jinput-raw_64.dll natives/OpenAL64.dll natives/NativeFmodDesigner.dll natives/NativeFmodDesigner64.dll natives/NativeFmodEx.dll natives/NativeFmodEx64.dll
[/quote]
start.bat include this:
java -Djava.library.path=“natives/” -jar “Master Destroyer.jar”

If i execute start i get this error he cant find fmodex
http://www.bilder-space.de/show_img.php?img=41aeeb-1326108356.png&size=original

No idea what you mean - it does work on all platforms. the eclipse export thing takes charge of the external jars I use; while I just say -Djava.library.path=lib.
and in the lib folder (not a jar), there are all the natives for all platforms

I’m assuming he means because LWJGL and Jogl usually have their native libraries in sub-dirs in their distribution for each platform. For LWJGL I always end up unpacking them into a single directory because IIRC none of them share names. I don’t know about Jogl though.

Aren’t the solaris and linux libraries both named liblwjgl.so?

Might be, but who plays games on Solaris? :persecutioncomplex:

@GustavXIII
That error is not related to LWJGL. It’s an FMOD error, maybe you didn’t include the FMOD libraries?

Yes but why? I include it in the manifest:
lib/NativeFmodEx-win.jar

Am I missing some file? grr

Oh are the natives inside the Jar? That doesn’t work unless the FMOD library extracts them and loads them itself.

Nobody on linux does, that’s for sure, which means if you unpack all the natives in the same place, you’ll have an awful hard time when the solaris libs overwrite the linux ones.

No I put them in the native directory which you can see on my image ^^
I included it in the maifest:
natives/NativeFmodDesigner.dll
natives/NativeFmodDesigner64.dll
natives/NativeFmodEx.dll
natives/NativeFmodEx64.dll

Maybe I need some other .dll?!?
I cant find another one having this problem _

I obviously dont add the solaris libs. Who cares about Solaris; I might as well start supporting like AmigaOS or OS/2.
Not only are you running Solaris, which I have not met a single person who has ever seen Solaris run, let alone using it, you’re also trying to play a game on it… yeah, right.

@FMOD stuff
you have to call Init.loadLibraries();
In case of FMOD I actually add those native jars to the build path in eclipse
so you have the normal jar and then win, win64, linux, linux64 and mac jar - which all include the natives
And you dont need Designer; well if you dont use it that is

I use Solaris at work quite frequently. Never play games on it though. :stuck_out_tongue:

yeah not a consumer situation

Despite the name, lwjgl is not just for games.

Ive done it

 try {
            Init.loadLibraries();
        } catch (InitException ex) {
            Logger.getLogger(MasterDestroyer.class.getName()).log(Level.SEVERE, null, ex);
        }

but still the same error.
I will delete FMOD and try it later -.-"