[SOLVED] java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

Hello,



I did some googling and could not find a solution so I was wondering if anyone could help. I have just downloaded and compiled JME using Netbeans 6.1 please advise.



Thanks



init:
deps-jar:
compile:
run:
02-Aug-2008 23:40:08 com.jme.app.BaseGame start
INFO: Application started.
02-Aug-2008 23:40:08 com.jme.system.PropertiesIO <init>
INFO: PropertiesIO created
02-Aug-2008 23:40:08 com.jme.system.PropertiesIO load
WARNING: Could not load properties. Creating a new one.
02-Aug-2008 23:40:08 class hellonode.Main start()
SEVERE: Exception in game loop
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1030)
        at org.lwjgl.Sys$1.run(Sys.java:75)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:68)
        at org.lwjgl.Sys.loadLibrary(Sys.java:84)
        at org.lwjgl.Sys.<clinit>(Sys.java:101)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:111)
        at com.jme.system.lwjgl.LWJGLPropertiesDialog$ModesRetriever.run(Unknown Source)
        at com.jme.app.AbstractGame.getAttributes(Unknown Source)
        at com.jme.app.BaseGame.start(Unknown Source)
        at hellonode.Main.main(Main.java:22)
02-Aug-2008 23:40:08 com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
02-Aug-2008 23:40:08 com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
02-Aug-2008 23:40:08 com.jme.app.BaseGame start
INFO: Application ending.
BUILD SUCCESSFUL (total time: 1 second)

You need VM Arguments: -Djava.library.path="PATH TO JMElib"



For searching, don't google. Search the JME Forums first.

Hello,



yes I already have that in the VM options pane.



-Djava.library.path=

Ah it worked with no quotes

I'm suprised it worked with no quotes. Basically the problem is the quotations from the wiki have some weird slant… they are not the usual quotations like --> "

Yeh, tried that as well. before. well it works now cheers :slight_smile:

What if this error eccurs while trying to run the source from this guide http://www.jmonkeyengine.com/wiki/doku.php?id=setting_up_netbeans_6.1_for_jme_2.0 ?

I am using Linux and I have put all the lwjgl jars in /opt/sun-jdk-1.6.0.07/jre/lib/ext . I had done the same with other packages before, and had no problem.

When making Java Free-Form Project, there is no VM argument field in options, so what should I do in order for the lwjgl to be properly imported?

manji said:

What if this error eccurs while trying to run the source from this guide http://www.jmonkeyengine.com/wiki/doku.php?id=setting_up_netbeans_6.1_for_jme_2.0 ?
I am using Linux and I have put all the lwjgl jars in /opt/sun-jdk-1.6.0.07/jre/lib/ext . I had done the same with other packages before, and had no problem.
When making Java Free-Form Project, there is no VM argument field in options, so what should I do in order for the lwjgl to be properly imported?

Oh noes! It must not of worked. I am using Windows and have no idea if it really works on Linux. I am trusting the guy from the first tutorial. What exactly did you type?

Answer: No quotes.

I'm saying, there is no "VM options" field to be filled, if I right click on a Free-Form Project in Netbeans6.1. So where exactly should I put this argument, quoted or no quoted?

Is it even possible to run the testChooser after JME2 has been built? I mean it seems to run fine, no errors(except some warnings)  until a list of examples shows up. Once, I choose one, then I get "no lwjgl in java.library.path" error.

I have a similar error. I'm searching the field where to put the options for the VM in order to make it run, but I haven't found anything yet.

I think the solution you suggest is for new projects using jME2, and not for it's instalation from zero, where I trigger that error.

Thanks

I downloaded the source from SVN, as it's written in the tutorial I mentioned before. I have one or two other problems after that, but I want to deal with them one by one.

I'm not in my PC right now, but I'm almost sure that importing a lwjgl  package, won't be rejected from the compiler, as I said all the jars needed are in /opt/sun-jdk-1.6.0.07/jre/lib/ext. I guess I'm missing smth…

manji said:

until a list of examples shows up. Once, I choose one, then I get "no lwjgl in java.library.path" error.

Are you using the latest jME2 source from svn, or a downloaded snapshot?

Wow. I just got a Linux VM through VMware with the same problem.

I'll search for a solution. It is happening for any JME stuff I run.

I am on the mac (leopard, etc.) and I had to prune by jvmarg from this:





<jvmarg value=  "-Djava.library.path=${libs}/jogl/native/windows_i586;${libs}/lwjgl/native/linux;${libs}/lwjgl/native/macosx;${libs}/lwjgl/native/win32;${libs}/swt/linux;${libs}/swt/macosx-carbon;${libs}/swt/macosx-cocoa;${libs}/swt/windows"/>



to only the mac lib:



<jvmarg value=  "-Djava.library.path=${libs}/lwjgl/native/macosx"/>



This is just to run the demo, though.

I just solved the same problem, the reason for mine was the following (stupid) one:



in the tutorial, they say to put



-Djava.library.path=<path to jME2 download locationliblwjglnativewin32>



when actually when exploring the folder, there's no 'win32' folder, but rather a 'windows' folder



then it worked …