UnsatisfiedLinkError: getNativeLibraryVersion

Started by Nark, February 19, 2005, 20:58:34

Previous topic - Next topic

Nark

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)

napier

Are you sure your app can find the native libe (lwjgl.dll)?
penGL/Java/LWJGL demos and code: http://potatoland.org/code/gl

Nark

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.

Chman

The DLL must be placed in the jre/bin/ directory...
Jar's in the jre/lib/ext/ directory...

Chman

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

Nark

Chman's solution works fine for me. Thanks.

Chman

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