unsatisfiedLinkError no lwjgl in java.libary.path

Started by xxdaggerxx, June 17, 2006, 09:24:37

Previous topic - Next topic

xxdaggerxx

Hi guys im writing a game based on the space invader's engine, and i get this error every time i execute unsatisfiedLinkError no lwjgl in java.libary.path. im using JCreater for compiling and executing. I can Compile sucessfully, but not execute, appreciate any help

aldacron

For Java programs to execute properly, classes they use need to be on the "class path" and any native libraries used need to be on the "library path". Your problem is that you haven't set the library path, so Java can't find the LWJGL dll.

The easy way to solve this is to put the DLL in the application's working directory. The better way to solve it is to pass the -D command line switch to the JVM. Somewhere in your project options in JCreator, you should be able to configure JVM command line arguments. You want to add this:

-Djava.library.path={path\to\lwjgl\}

So, if your LWGJL dlls were all in C:\lwjgl\native, then this is what you would set:

-Djava.library.path=C:\lwgjl\native

What I like to do is to keep the native libraries I use most frequently in a single directory (C:\dev\java\native). That's just for the development cycle, of course. When (if) you distribute the app you'll want to copy the dlls you use to the app directory.

xxdaggerxx