LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: Nark on February 19, 2005, 20:58:34

Title: UnsatisfiedLinkError: getNativeLibraryVersion
Post by: Nark on February 19, 2005, 20:58:34
hi there,

after seeing what applications you can develop with so little code woth LWJGL I wanted to give it a try.

I am trying to get the NEHE Lesson1 running. It compiles fine but then Java outputs the following message:
(BTH: I built it with the newest version of Eclipse and have jdk and jre both 1.5.0_01 installed).

Exception in thread "main" java.lang.UnsatisfiedLinkError: getNativeLibraryVersion
at org.lwjgl.DefaultSysImplementation.getNativeLibraryVersion(Native Method)
at org.lwjgl.Sys.<clinit>(Sys.java:71)
at org.lwjgl.opengl.Display.<clinit>(Display.java:92)
at Lesson01.findDisplayMode(Lesson01.java:127)
at Lesson01.createWindow(Lesson01.java:119)
at Lesson01.init(Lesson01.java:148)
at Lesson01.run(Lesson01.java:56)
at Lesson01.main(Lesson01.java:46)
Title: UnsatisfiedLinkError: getNativeLibraryVersion
Post by: napier on February 20, 2005, 00:42:52
Are you sure your app can find the native libe (lwjgl.dll)?
Title: UnsatisfiedLinkError: getNativeLibraryVersion
Post by: Nark on February 20, 2005, 01:13:13
Quote from: "napier"Are you sure your app can find the native libe (lwjgl.dll)?

No.
Because I didn't know what to do with it I just placed it in the jdk \lib, \jre\lib and the jre \lib Directories.
Title: UnsatisfiedLinkError: getNativeLibraryVersion
Post by: Chman on February 20, 2005, 09:45:31
The DLL must be placed in the jre/bin/ directory...
Jar's in the jre/lib/ext/ directory...

Chman
Title: UnsatisfiedLinkError: getNativeLibraryVersion
Post by: Matzon on February 20, 2005, 10:08:29
NO!
Please don't ever place them in there!!!
It's like peeing on yourself on a cold winters day.

Place the dll's where ever you like (preferably <project>\lib)
and then tell the VM to look in that folder using -Djava.library.path=\lib
Title: UnsatisfiedLinkError: getNativeLibraryVersion
Post by: Nark on February 20, 2005, 12:01:01
Chman's solution works fine for me. Thanks.
Title: UnsatisfiedLinkError: getNativeLibraryVersion
Post by: Chman on February 20, 2005, 12:06:46
Quote from: "Matzon"NO!
Please don't ever place them in there!!!
It's like peeing on yourself on a cold winters day.

Place the dll's where ever you like (preferably <project>\lib)
and then tell the VM to look in that folder using -Djava.library.path=\lib

Well, Matzon is right, you should do that, but it may be easier for newbie to put all the file directly in the jre so they don't have to bother with all lib & bin includes...
Putting the files into the JRE alwais work, specifying a location can fail is the developper don't use the command correctly :?

Personnally I use the -D command.

Chman