lwjglplayn

no lwjgl in java.library.path in playN hello sample


I'm having an error trying to run java playN project. The other ons seems to be fine. The error is: Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path.

There is dependencied library lwjgl 2.83 in the project. Whatis wrong here?


Solution

  • While you have the java dependency, you don't have the native library.

    You'll need to download lwjgl from http://www.lwjgl.org/, unpack and set up according to http://www.lwjgl.org/wiki/index.php?title=Main_Page#Getting_started

    TL;DR: Once you have your plattform's libraries extracted you need to point Java there using the following as VM Parameters:

    -Djava.library.path=[Path/To/Libs]
    

    I think if you run it with maven instead, it should work out of the box (maybe)

    /Edit: or follow this instruction: How to fix java.lang... it doesn't depend on your own downloaded libraries but fetches them using maven.