LWJGL on Nebeans (Linux)

Started by fredcrs, November 09, 2008, 02:09:50

Previous topic - Next topic

fredcrs

Hello, I am new here, and I have searched the google for information on how to configure LWGL to use wth Netbeans and didnt find any =(
I don know much about Linux yet, so I am a bit lost herre.
I have downloaded the lwjgl ZIP file and extracted
Then I clicked on Libraries in the Netbeans Menu
Then I clicked New Library and created LWJGL
Then I clicked on Add Jar/Folder...
and added all Jar files in the Jar folder of the extracted LWJGL.

What more should I have to do??
Also I was wondering if you have a quick code to test if I configurated it ok.

Thanks very much for any help
Cheers
Fred

Matzon

you need to extract lwjgl to wherever you want it.
then you add the jar files to your project settings
when you create the 'run' or 'debug' command you need to add a VM argument: -Djava.library.path=<path\to\lwjgl\binaries> <-- .so or .dll or .dylib

fredcrs

Netbeans creates the jar file automatically... when running it do I need to add the VM argument everytime?
also do you have a quick code for me to test if I did everything right??

fredcrs

ok I fixed
java -Djava.library.path=</home/fredcrs/NetBeansProjects/lwjgl-2.0/native/linux/> -jar lwjgl_test.jar


got this:
Exception in thread "main" java.lang.NoClassDefFoundError: lwjgl_test/jar
Caused by: java.lang.ClassNotFoundException: lwjgl_test.jar
   at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
Could not find the main class: lwjgl_test.jar. Program will exit.



Idea??

sorry for lots of msgs =)



EDIT:
Now I tryed with " instead of <> and it said:
Failed to load Main-Class manifest attribute from
lwjgl_test.jar



I am starting to think that this lwjgl_test.jar is not to run =)

fredcrs

Ok now I tryed to run one project example I got from
http://gpwiki.org/index.php/OpenGL:Tutorials:Java:LWJGL:Introduction
but nothing happens.
It compiled but when I try to run nothing appears

Thanks!

fredcrs

LoL nevermore
I git it working right now.... My code was wrong, the example is working
Thanks for your first help, I got ir because of that!!!