Java.library.path issue :(

I know this is a very comman ask according to the help url but I can't run anything at all.

I've followed the netbeans tutorial carefully and the same for exclipse and i get the same error in both IDEs. I have set the java.library.path and tried making it relative and absolute but its all been to no avail. I'm not sure what's going wrong…apart from the fact that it can't find lgwgl for soem reason.

I'm running the Helloworld program from the tutorials.

Here's the stacktrace




Updating property file:

Compiling 1 source file to C:UsersCourtneyDocumentsprogrammingnetbeansWorkspace3DJ3Dbuildclasses



07-Mar-2010 22:50:35 start

INFO: Application started.

07-Mar-2010 22:50:35 com.jme.system.PropertiesGameSettings <init>

INFO: PropertiesGameSettings created

07-Mar-2010 22:50:35 com.jme.system.PropertiesGameSettings load

WARNING: Could not load properties. Creating a new one.

07-Mar-2010 22:50:35 initSystem

INFO: jME version 2.0 Stable (r4093)

07-Mar-2010 22:50:35 com.jme.input.joystick.DummyJoystickInput <init>

INFO: Joystick support is disabled

07-Mar-2010 22:50:35 com.jme.system.lwjgl.LWJGLDisplaySystem <init>

INFO: LWJGL Display System created.

07-Mar-2010 22:50:35 class org.J3D start()

SEVERE: Exception in game loop

java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

       at java.lang.ClassLoader.loadLibrary(

       at java.lang.Runtime.loadLibrary0(

       at java.lang.System.loadLibrary(

       at org.lwjgl.Sys$

       at Method)

       at org.lwjgl.Sys.doLoadLibrary(

       at org.lwjgl.Sys.loadLibrary(

       at org.lwjgl.Sys.<clinit>(

       at org.lwjgl.opengl.Display.<clinit>(

       at com.jme.system.lwjgl.LWJGLDisplaySystem.getValidDisplayMode(

       at com.jme.system.lwjgl.LWJGLDisplaySystem.selectMode(

       at com.jme.system.lwjgl.LWJGLDisplaySystem.initDisplay(

       at com.jme.system.lwjgl.LWJGLDisplaySystem.createWindow(



       at org.J3D.main(

07-Mar-2010 22:50:35 cleanup

INFO: Cleaning up resources.

07-Mar-2010 22:50:35 start

INFO: Application ending.

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.opengl.Display

       at com.jme.system.lwjgl.LWJGLDisplaySystem.close(




       at org.J3D.main(

Java Result: 1

BUILD SUCCESSFUL (total time: 1 second)

thanks in advance for any help

Hi, this should be a simple problem to fix… 

I see the example you posted is from Netbeans… I'm not very savvy with Netbeans, but I can certainly steer you through an Eclipse setup :slight_smile:

-In your Eclipse workspace, right-click the 'jme' project and select properties.

-Select 'Java Build Path' from the list on the left and then select the "Libraries" tab.

-In this tab, you should see a few libraries with names like "jinput.jar", "jogl.jar", and "lwjgl.jar"

-Select the arrow next to lwjgl.jar to expand it, select 'Native library location', and click edit.

-In the 'Library Folder Configuration' window that pops up, select the "Workspace…" button

-This will bring up a list of projects in your current Eclipse workspace, expand the jME project and look in lib/lwjgl.

-Within this folder, select the operating system that applies for you (looks to be Windows in your case) and click ok

-You will also want to make sure that you have the correct SWT jar selected…  Select "Add JARs" and once again expand the jme project.  Now select swt.jar in lib/swt/windows

You should now be able to run the build.xml to build the jME jar's as well as run the examples in the jmetest packages

I’m trying to run jme3/src/test/jme3test/awt/, and get the common error:

Exception in thread “LWJGL Renderer Thread” java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

This is apparently easy to fix, but I think the docs are for JME2, not JME3 because the arch specific libs are merged together somehow. In Eclipse, I’ve tried various ways of adding JME3-lwjgl-natives.jar, but nothing seems to work.

Ok, this is aparently half a year old, but anyways, if someone else (like me) stumbles upon the same error, here is the solution:

The Sample “” contains the following line:


which apparently causes the program not to load native libraries like lwjgl (the responsible code resides in initialize() ). If you comment out this line (the purpose of which I do not fully understand) the sample works perfectly.



The call lets the system know that its running under low permissions/privileges. Some things in jME3, like extracting natives or registering an uncaught exception handler, require elevated privileges which are not available when running in applet/webstart

The canvas application is certainly not an applet. Why was this line included without ensuring that the needed libraries are loaded otherwise?

Ah I see now. Yeah its a copy and paste error, fixed in SVN