Hey everyone
As a summerproject I wanted to develop a little tycoongame. I discovered that Slick was a good way to graphically enhance this game, so I wanted to give this a try.
However, I can't seem to get it working. I've spent the whole last day trying lots and lots of things, googling, etc. And I can't figure it out.
I hope anybody who runs IntelliJ can help me out?
I've imported the slick.jar and lwjgl.jar into my project. (Project Structure > Project Settings > Libraries > added a library "Slick" > attached classes to it)
IntelliJ does find the classes of Slick, so that works fine. I'm not sure of the lwjgl.jar, but I imported it in the same way as slick.jar
Both jar's show up in classpath, as far as I can tell, but when I try to run my project I get this errormessage:
Code:
"C:\Program Files (x86)\Java\jdk1.6.0_20\bin\java" -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 9.0.2\bin" -Dfile.encoding=windows-1252 -classpath "C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\alt-rt.jar;C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\charsets.jar;C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\deploy.jar;C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\javaws.jar;C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\jce.jar;C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\jsse.jar;C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\management-agent.jar;C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\plugin.jar;C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\resources.jar;C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\rt.jar;C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\ext\dnsns.jar;C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\ext\localedata.jar;C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\ext\sunjce_provider.jar;C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\ext\sunmscapi.jar;C:\Program Files (x86)\Java\jdk1.6.0_20\jre\lib\ext\sunpkcs11.jar;C:\Users\Glenn\My Projects\IdeaProjects\TVTycoon\out\production\TVTycoon;C:\Program Files (x86)\Java\slick\lib\slick.jar;C:\Program Files (x86)\Java\slick\lib\lwjgl.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 9.0.2\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain com.viqon.TVTycoon.TVTycoonGame
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1734)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at org.lwjgl.Sys$1.run(Sys.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.Sys.doLoadLibrary(Sys.java:68)
at org.lwjgl.Sys.loadLibrary(Sys.java:84)
at org.lwjgl.Sys.<clinit>(Sys.java:101)
at org.lwjgl.opengl.Display.<clinit>(Display.java:128)
at org.newdawn.slick.AppGameContainer$1.run(AppGameContainer.java:39)
at java.security.AccessController.doPrivileged(Native Method)
at org.newdawn.slick.AppGameContainer.<clinit>(AppGameContainer.java:36)
at com.viqon.TVTycoon.TVTycoonGame.main(TVTycoonGame.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:110)
I googled around and i found on the official lwjgl site this:
Quote:
Q: When running the examples or my own program I get a 'Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path.
A: The VM cannot locate the lwjgl runtime library. Specify the path to it using -Djava.library.path=<path/to/library>
But I think it is allready in the classpath (as it shows up in the errormessage classpath)?
It seems to me I have to import the native classes. I tried to include those jar-files (natives-linux, natives-mac, natives-win32) the same way as I did with slick.jar, but that doesn't work either. So for now I left them out.
Does anybody have any idea how to get this working?