Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm having a problem with LWJGL in Eclipse, when I run my game using Eclipse, it runs perfectly fine, but if I export it as a jar, I get the following stacktrace:
XML
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.libr
ary.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$1.run(Sys.java:73)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
        at org.lwjgl.Sys.loadLibrary(Sys.java:95)
        at org.lwjgl.Sys.<clinit>(Sys.java:112)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:132)
        at com.base.engine.Window.createWindow(Window.java:13)
        at com.base.engine.MainComponent.main(MainComponent.java:118)


I've googled it a thousand times and every single answer is 'add the natives to your project,' this doesn't work for me, I have the LWJGL natives linked to every LWJGL jar in the project, there's no reason it shouldn't work.
Posted
Comments
Richard MacCutchan 12-Dec-13 3:55am    
Have you tried asking at http://lwjgl.org/?

1 solution

Make sure the LWJGL jar is in the CLASSPATH when you run your project and I believe there is also a DLL it uses that must be in the system path.
 
Share this answer
 
Comments
HuggableAlien 19-Dec-13 5:53am    
I eventually found this out myself, but you were the first to answer this, so I marked your's as answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900