Problems to start an LWJGL Example (Eclipse)

Started by RooKee, June 21, 2005, 13:06:14

Previous topic - Next topic

RooKee

Hi guys...

I wanted to taste game development in Java. But I have some problems with starting the examples from this page. I use the IDE eclipse and checked the install manual, but it do not work. So I need help.. :-(

First I download the jar files for win32 from the download mirror and copy the jar files in my %JAVA_HOME%/lib/ext/. Now i startet a new project with eclipse. I copied the lession 1 sourcecode from the homepage. Then I click on the RUN button and write the libary directory in the VM arguments:

-Djava.libary.path= "C:\programms\java\jre1.5.0_02\lib\ext"


Now, I tought, I can just startet the example but now.... I have got a exception:



java.lang.NoClassDefFoundError: C:\programms\java\jre1/5/0_02\lib\ext
Exception in thread "main"


Can anybody me help...? :?:

tomb

You'll never want to copy any lwjgl files into the lib/ext folder of the jre. It will only cause conflicts in the future. Instead right click on your project in the "Package Explorer" in eclipse. Under "Java Build Path" use the "Add External Jars" to add the jars you need.

I think your error message is caused by the space (" ") after "-Djava.libary.path=". Replace it with this instead:
-Djava.libary.path="C:\programms\java\jre1.5.0_02\lib\ext"

I just copy and paste the dll files into the project in the Package Explorer.

RooKee

Ôk, thanks.. But now i've got an other exception:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.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.<clinit>(Sys.java:61)
	at org.lwjgl.openal.AL.<clinit>(AL.java:77)
	at Lession1.execute(Lession1.java:107)
	at Lession1.main(Lession1.java:157)


Do you know what's wrong?

Hey and can you explain me why i neverput jar files in the EXT folder in the JRE...

Edit:

Hey i've got the screenshots from my eclipse IDE. Maybe it helps...
http://www.browser-games.net/eclipse01.gif
http://www.browser-games.net/eclipse02.gif
http://www.browser-games.net/eclipse03.gif

KirkD

You need to add the following to your projects Run Arguments.


-Djava.library.path=C:\development\lwjgl-win32-0.97.1\lwjgl-win32-0.97\native

Replace the above path with your path to the native libraries.

RooKee

Hey thanks.. now it works, but bevor I have the native implements too.. see the screenshots. But now I have chanced the -Djava.libary.path=C:\native and now it work

Thanks

tomb

Quote from: "RooKee"
Hey and can you explain me why i neverput jar files in the EXT folder in the JRE...
Because it can cause conflict when you run applications or webstarted applications. They will provide their own lwjgl.jar but there is already one in the ext folder. Wich one is used? Also, you have more than one jre on your system. Soon you'll end up with different versions in each directory and your app wont work, and you wont know why. Anyway, NEVER copy lwjgl files into the ext folder. Just don't.