How to fix java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path in Eclipse

6,109 views
Skip to first unread message

bou...@gmail.com

unread,
Jun 12, 2012, 4:38:47 PM6/12/12
to pl...@googlegroups.com
When running my game from the Eclipse run/debug buttons I got an console message telling me there wasn't a lwjgl lib.

I endured through fixing this bug/error/annoyance and found it annoying enough to share the fix with you.


First: test your core project, by right-clicking and Run as > Maven test, this will download the native libs to your java project into target/natives. 

I tried setting the build path of lwjgl-2.8.3.jar to this folder several times, but somehow this was reset everytime. I suspect it has something to do with maven, though I'm not sure.

Second: go to the run configuration of your java project (this can be done through pressing the little arrow next to the run button and clicking Run Configurations, then selecting your project from the list on the left side of the dialog) open the Arguments tab and enter "-Djava.library.path=target/natives" into the VM Arguments.

I hope this helps anyone have this same issue.

jonas...@gmail.com

unread,
Jul 18, 2012, 6:32:47 PM7/18/12
to pl...@googlegroups.com
Thank you for posting it. :)

ezequie...@gmail.com

unread,
Jul 27, 2012, 4:16:28 PM7/27/12
to pl...@googlegroups.com, bou...@gmail.com
Thank you!

keld...@gmail.com

unread,
Jul 31, 2012, 2:35:24 PM7/31/12
to pl...@googlegroups.com, bou...@gmail.com
I managed to resolve this by removing the <pluginManagement> section from pom.xml file in  {project}-java as I noticed the pom.xml file created by the Maven skeleton project differs from the pom.xml file in playn-showcase-java

Regards,
KA

stoke...@gmail.com

unread,
Dec 24, 2012, 5:51:52 AM12/24/12
to pl...@googlegroups.com
Thanks for posting this. Saved me a bunch of time and frustration


On Tuesday, 12 June 2012 21:38:47 UTC+1, bou...@gmail.com wrote:

Jeramie Risinger

unread,
Dec 25, 2012, 2:02:22 AM12/25/12
to pl...@googlegroups.com, bou...@gmail.com
This can show up if you are building other playN projects that are different versions than what you might be actively working on.  For instance, it happened to me when I built some crusty old playN tutorial.  Afterwards, I went back to my project and tried to do the instant feedback/debug loop some more and was puzzled by this crazy error.  In my case, all I needed to do was a simple mvn clean install, and the world went happy again.

Hope that helps.

imanda...@gmail.com

unread,
Aug 23, 2013, 9:08:34 AM8/23/13
to pl...@googlegroups.com, bou...@gmail.com
 I am facing the same issue dont know what to do ...i am searching since 5 days ...

 

this is the 

java.library.path

C:\Program Files\Java\jre7\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Lenovo;C:\PROGRA~1\E!PC;C:\ADX_UDT1;C:\Program Files\Java\jre6\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Lenovo;C:\PROGRA~1\E!PC;C:\SERVER\PROPERTIES;C:\BackUp\setup\eclipse-jee-juno-SR2-win32\eclipse;C:\ADX_UDT1;C:\BackUp\desktop\jars;;.

Exception in thread "main" java.lang.UnsatisfiedLinkError: no os4690 in java.library.path

at java.lang.ClassLoader.loadLibrary(Unknown Source)

at java.lang.Runtime.loadLibrary0(Unknown Source)

at java.lang.System.loadLibrary(Unknown Source)

at com.ibm.OS4690.Native4690.<clinit>

 
 

Daniel Gerson

unread,
Aug 24, 2013, 3:01:48 PM8/24/13
to pl...@googlegroups.com, bou...@gmail.com, imanda...@gmail.com

 
 I am facing the same issue dont know what to do ...i am searching since 5 days ...

 

imanda...@gmail.com

unread,
Aug 26, 2013, 2:54:58 AM8/26/13
to pl...@googlegroups.com, bou...@gmail.com, imanda...@gmail.com
its not a game .. i am importing a project  (eclipse 3)
 
in the eclipse juno .. am able to compile but geting this error while runing
 
everything seems 2 b proper ... dont know wats the problem ..
 
Pls if u can help .... give me some clues ..  

Daniel Gerson

unread,
Aug 26, 2013, 10:05:05 AM8/26/13
to pl...@googlegroups.com, bou...@gmail.com, imanda...@gmail.com
Which project are you importing? I posted the link to ask if you got an error importing the default project created from the default maven archetype?
If you're importing some other project, the issue may lie there, so you'd have to post some code or better upload that project to github etc.... 

Trying to isolate issues.

DMG

imanda...@gmail.com

unread,
Aug 28, 2013, 8:50:13 AM8/28/13
to pl...@googlegroups.com, bou...@gmail.com, imanda...@gmail.com
 thanks daniel ,
 
 Actually I am importing a project which contains jar from 4690 Operating System its a AS400 (mainframe os)
 
 my code is compling properly ...but while i am accessing to the files which are under this jar .. i am getting
this error ...
 
  I just wanted to clear 2 things ..
 
 i )  IS it just a classpath , or setup problem  ???  coz i have imported jar properly
 
 ii )  Is there any problem in the jar ??
 
 
 

Exception in thread "main" java.lang.UnsatisfiedLinkError: no os4690 in java.library.path

at java.lang.ClassLoader.loadLibrary(Unknown Source)

at java.lang.Runtime.loadLibrary0(Unknown Source)

at java.lang.System.loadLibrary(Unknown Source)

at com.ibm.OS4690.Native4690.<clinit>

 

Daniel Gerson

unread,
Aug 28, 2013, 12:21:07 PM8/28/13
to pl...@googlegroups.com, bou...@gmail.com, imanda...@gmail.com


On Wednesday, August 28, 2013 2:50:13 PM UTC+2, imanda...@gmail.com wrote:
 thanks daniel ,
 
 Actually I am importing a project which contains jar from 4690 Operating System its a AS400 (mainframe os)
 
 my code is compling properly ...but while i am accessing to the files which are under this jar .. i am getting
this error ...
 
  I just wanted to clear 2 things ..
 
 i )  IS it just a classpath , or setup problem  ???  coz i have imported jar properly
 
 ii )  Is there any problem in the jar ??
 
 
 

Exception in thread "main" java.lang.UnsatisfiedLinkError: no os4690 in java.library.path

at java.lang.ClassLoader.loadLibrary(Unknown Source)

at java.lang.Runtime.loadLibrary0(Unknown Source)

at java.lang.System.loadLibrary(Unknown Source)

at com.ibm.OS4690.Native4690.<clinit>


Oh, I see. This has nothing to do with PlayN. You've used a 3rd party library, and are getting an error similar to a PlayN user... that's why you're asking here.
You should have made that clearer, given that this forum is intended for helping PlayN game developers.

Well, what's likely happened is that com.ibm.OS4690.Native4690 is not vanilla java, it uses some native os4690 (operating system?) library files that it expects to be in a specific place. If those files are not in that specific place, then that java code that is bound to the native code will freak out. It will also freak out if the native code isn't the version it expects to be bound to and the interface in the native code is different.

Beyond that, I don't think you'll get help here as the context is not familiar or of interest to the people here.

DMG
 
Reply all
Reply to author
Forward
0 new messages