LWJGL Forum

Programming => LWJGL Documentation => Topic started by: doublethink on October 05, 2007, 19:46:58

Title: "no lwjgl in java.library.path" in eclipse
Post by: doublethink on October 05, 2007, 19:46:58
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!
Title: Re: "no lwjgl in java.library.path" in eclipse
Post by: Schnitter on October 05, 2007, 20:12:33
The argument must be relative to the class path.
Title: Re: "no lwjgl in java.library.path" in eclipse
Post by: doublethink on October 06, 2007, 05:21:59
I'm not really sure what you mean by that ???
Title: Re: "no lwjgl in java.library.path" in eclipse
Post by: Schnitter on October 06, 2007, 09:17:39
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\"
Title: Re: "no lwjgl in java.library.path" in eclipse
Post by: aldacron on October 06, 2007, 19:13:09
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.
Title: Re: "no lwjgl in java.library.path" in eclipse
Post by: CaptainJester on October 16, 2007, 14:02:35
Could be a problem with Eclipse.  Try running something from the command line.  If that works, then I'd say try re-installing Eclipse.
Title: Re: "no lwjgl in java.library.path" in eclipse
Post by: hexogon on December 07, 2007, 01:45:26
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.


Title: Re: "no lwjgl in java.library.path" in eclipse
Post by: Erodan on August 03, 2008, 13:19:48
ive got a problem too when compiling

java.lang.NoClassDefFoundError:[nativeDllPath]
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






Title: Re: "no lwjgl in java.library.path" in eclipse
Post by: Matzon on August 04, 2008, 07:28:26
there aren't any lwjgl parts in that stacktrace...