How to set up an LWJGL project

Hi guys,

I am looking to begin OpenGL programming but I am having trouble compiling a project using the LWJGL 3.1.1 library Jar files. My trouble seems to be with the native library files.

I have downloaded the “minimal OpenGL” zip bundle and added the LWJGL, OpenGL and GLFW Jar files (classes, source and natives) as shown in the following picture.

I have attempted to run the basic “Getting Started” code from the LWJGL website, it compiles successfully, but if I try to run the project I get the following error message:

After some investigation I have found that I need to point the project to the location of the native files using the “Djava.library.path” argument in the “Run Configuration” screen. I have tried setting this argument to my project’s “lib” folder containing the library JAR files, but this did not work. I also noticed that the LWJGL Wiki provides the following information:

“The LWJGL native shared libraries do NOT need to be extracted from their .jar files. The SharedLibraryLoader that is included with LWJGL does it automatically at runtime.”

…but I do not know how to use the SharedLibraryLoader, or what it really is for that matter…

Is anyone able to show me what I am doing wrong? Maybe provide a screenshot of your library/run configuration screens of a working project?

Thanks in advanced guys!