"no lwjgl in java.library.path" in eclipse

Started by doublethink, October 05, 2007, 19:46:58

Previous topic - Next topic


Hi all!

I am having a problem setting eclipse up with LWJGL. I have set the path to the libraries to:

Default VM Arguments: -Djava.library.path="C:\Program Files\Java\lwjgl-1.1.2\native\win32"

The dlls are in this folder, but obviously I have missed something out here. For the life of me I can't seem to find the problem. :/

Any help would be greatly appreciated!


The argument must be relative to the class path.


I'm not really sure what you mean by that ???


Ok.^^ You can i.e. create a folder in the project-folder in your workbench(Eclipse?). In the folder you created, you copy the lwjgl-folder.
Than you can write i.e. -Djava.library.path="lwjgl\native\win32\"


Quote from: Schnitter on October 05, 2007, 20:12:33
The argument must be relative to the class path.

That's actually incorrect. Absolute paths work just fine. Besides which, the classpath has nothing to do with the library path. There's some other issue afoot here.


Could be a problem with Eclipse.  Try running something from the command line.  If that works, then I'd say try re-installing Eclipse.
The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)


I think if you right click your project in the package explorer there should be a 'properties' item. The properties dialog should have a section called 'build' or something similar. This is where you add libraries to your project under eclipse. You probably want to create a library called 'LWJGL' and add it here configured to point to lwjgl's jars, javadoc, source and native libraries (the native libraries part seems to be where your problem lies). If I remember correctly you can specify separate javadoc, source and native library paths for each jar here (ie lwjgl.jar, jinput.jar, lwjgl_util.jar, etc...) setting these up may make your life a lot easier.

I believe you can also alternatively just throw the native dll's (or so's, or whatever) into the same folder as your compiled jar - but i'm not sure about that and you could run into home path problems if you dbl-click to run your jar. Anyone know for sure?

hope that helps, I can't remember the exact details at the moment - but the general idea is to setup a library pointing to the lwjgl jars + lwjgl native librarys (dlls) and make sure the library is linked with your project.


ive got a problem too when compiling

at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)

i think i have done everything as sayed in the installation guide but it seems that ive messed with a path


there aren't any lwjgl parts in that stacktrace...