Skip to content

Getting ‘java.lang.UnsatisfiedLinkError’: no lwjgl in java.library.path

Note this is different from this question because it does not deal with linking because it’s not asking how to link it via the CLI, but the GUI in Eclipse.

I have been trying to write a simple program using LWJGL. When I add the library to Eclipse (Kepler 4.3.1 on Windows 7 64bit) and write a program, it does not show red squigglies under the the things which use LWJGL. However, trying to run it gives me the following stacktrace:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl 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 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 DisplayExample.start(
    at DisplayExample.main(

(Yes, that is the example they give first, but I wanted to run it to make sure everything was installled properly)

My question is, how do I fix this error? Note that, even when running in Eclipse, it still fails. If I run something else which does not use LWJGL it works, too. I just downloaded it from the internet – it only had one version, so I assume it was the correct one. From what I can see, none of the other question askers have the same error as me – but if you could point me to informative questions that would be helpful too.



You don’t have the natives set up in your LWJGL application.

Here’s how to do it:

  1. Go to your LWJGL folder that contains the folders named “jar”, “res”, “doc”, and “native”. You need to go into Eclipse (assuming you use eclipse), open your project in the Project Explorer on the left side of your screen.
  2. Right click on the “JRE System Library” of your project, and click “Build Path” -> “Configure Build Path”.
  3. Include the LWJGL native libraries to your project in the Build Path Configurer by clicking the “Native library location” which can be seen in the JRE System Library dropdown menu.
  4. Click on “Edit…”, which will be the only button clickable in that general area.
  5. A file explorer will pop up. Navigate to the location of your LWJGL native folder (The location should be something like “C:UsersYOURUSERNAMEHEREDesktopJavaeclipselwjgl-2.9.0native” if you are using Windows) and include the folder named [Your OS here].

Hope this helped 🙂

User contributions licensed under: CC BY-SA
2 People found this is helpful