Hello Guest

LWJGL on Nebeans (Linux)

  • 5 Replies
  • 12891 Views
LWJGL on Nebeans (Linux)
« on: November 09, 2008, 02:09:50 »
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

*

Offline Matzon

  • *****
  • 2242
Re: LWJGL on Nebeans (Linux)
« Reply #1 on: November 09, 2008, 08:43:06 »
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

Re: LWJGL on Nebeans (Linux)
« Reply #2 on: November 09, 2008, 16:33:04 »
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??

Re: LWJGL on Nebeans (Linux)
« Reply #3 on: November 09, 2008, 16:51:10 »
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 =)
« Last Edit: November 09, 2008, 17:37:35 by fredcrs »

Re: LWJGL on Nebeans (Linux)
« Reply #4 on: November 09, 2008, 18:16:12 »
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!

Re: LWJGL on Nebeans (Linux)
« Reply #5 on: November 09, 2008, 18:35:04 »
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!!!