0

I have been following this link in order to set up the workspace, named "towerpg" (I wanted to create an RPG game in Java): https://www.youtube.com/watch?v=0v56I5UWrYY&feature=iv&src_vid=VS8wlS9hF8E&annotation_id=annotation_3428321851

I've followed every single step on the YouTube Video, however, I'm getting this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1764)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1044)
    at org.lwjgl.Sys$1.run(Sys.java:72)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
    at org.lwjgl.Sys.loadLibrary(Sys.java:96)
    at org.lwjgl.Sys.<clinit>(Sys.java:117)
    at org.lwjgl.opengl.Display.<clinit>(Display.java:135)
    at towerpg.Main.main(Main.java:11)

My code:

package towerpg;

import org.lwjgl.LWJGLException;
import org.lwjgl.opengl.Display;

public class Main {

    public static void main(String[] args) {
        try {
            Display.create();
        } catch (LWJGLException e) {
            e.printStackTrace();
        }
    }

}

Not sure what I did wrong here, I've done everything I'm supposed to do. Is someone able to help me?

Orion Hsu
  • 29
  • 2
  • 1
    possible duplicate of [LWJGL 'java.lang.UnsatisfiedLinkError': no lwjgl in java.library.path](http://stackoverflow.com/questions/24592513/lwjgl-java-lang-unsatisfiedlinkerror-no-lwjgl-in-java-library-path) – javac Jul 04 '15 at 07:08

1 Answers1

0

Add a JVM option that says:
-Djava.library.path="/path/to/mac/native/files/directory"
The directory should be in the downloaded LWJGL files.

John Smith
  • 98
  • 1
  • 1
  • 6