| Author |
What is java.library.path?
|
Vanchi Nathan
Ranch Hand
Joined: Feb 24, 2004
Posts: 107
|
|
Hi, I wonder what is java.library.path? where should i set this and how? please guide.
|
Best regards,<br /> <br />vanchin
|
 |
Alex Aver
Greenhorn
Joined: Jul 09, 2005
Posts: 5
|
|
Hi, Vanchi, Your application tries to load a native library called liblwjgl.so (Linux) or lwjgl.dll (Windows). Check to see if this file exists and what it's file permissions are. This problem most often shows up because the file does not exist, has incorrect file permissions, or can not be located by the JVM. Under Linux set LD_LIBRARY_PATH. Under Windows set PATH.
|
 |
Vanchi Nathan
Ranch Hand
Joined: Feb 24, 2004
Posts: 107
|
|
Hi Alex, Thanks, I found the lwjgl.dll files, there are about 4 dll files. Where should i put them? How to find out that JVM is looking for a '.dll' or '.so' module from the exception thrown? regards,
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 23395
|
|
The message says "java.lang.UnsatisfiedLinkError: no lwjgl in java.libr ary.path". The "lwjgl" is interpreted in a platform-dependent way. On Windows, it means LWJGL.DLL . On Linux and many other UNIX variants, it means "liblwjgl.so". On other platforms, it may mean something else. You're just supposed to know what it means on your platform. Since you're on windows, just make sure the file(s) are in a directory named on your PATH environment variable; you could add an entry if need be.
|
[Jess in Action][AskingGoodQuestions]
|
 |
Chris Hurst
Ranch Hand
Joined: Oct 26, 2003
Posts: 343
|
|
|
From memory JNI is a bit of a pain (on Windows any way) in that it can also say it can't find things when it means it can't load things so if your DLL needs another DLL you can sometimes get this error.
|
"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 11642
|
|
java.library.path is the path that Java uses to find native libraries (such as lwjgl.dll). You should set it to the directory that contains the DLL files. You specify this with the -D switch on the command line, for example:
java -Djava.library.path=C:\Java\ljwgl\libs org.mypackage.MyProgram
*edit* Oh, this is an old topic from 2005. (Chris, the original poster is most likely not still waiting for an answer...).
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
Nitin Harane
Greenhorn
Joined: Apr 29, 2011
Posts: 2
|
|
|
java.library.path is the path that Java uses to find native libraries (such as lwjgl.dll).
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 26710
|
|
Nitin Harane welcome to the Ranch
|
 |
Jitendra Kumar Jain
Greenhorn
Joined: Jun 28, 2011
Posts: 14
|
|
|
Does it override all the set path via -Djava.library.path?
|
 |
 |
|
|
subject: What is java.library.path?
|
|
|