LWJGL Forum

Programming => LWJGL Documentation => Topic started by: jomaveger on December 22, 2008, 11:07:34

Title: LWJGL in NetBeans (Leopard)
Post by: jomaveger on December 22, 2008, 11:07:34
Hello!

I'm having a problem in order to get LWJGL working in Leopard. I am using NetBeans 6.5 and LWJGL 2.0.1. I've created a library, added all the jars and put the vm parameter like that:

-Djava.library.path=/Usuarios/jomaveger/Projects/Libraries/LWJGL2.0.1/native/macosx/liblwjgl.jnilib:/Usuarios/jomaveger/Projects/Libraries/LWJGL2.0.1/native/macosx/libjinput-osx.jnilib:/Usuarios/jomaveger/Projects/Libraries/LWJGL2.0.1/native/macosx/openal.dylib

I always get the same error message:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1753)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1030)
        at org.lwjgl.Sys$1.run(Sys.java:72)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)
        at org.lwjgl.Sys.loadLibrary(Sys.java:81)
        at org.lwjgl.Sys.<clinit>(Sys.java:98)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:129)
        at org.jomaveger.relax.VentanaDeJuego.<init>(VentanaDeJuego.java:25)
        at org.jomaveger.relax.Main.main(Main.java:19)
Java Result: 1

Does anybody know what happens?

Thanks in advance.

Regards and Merry Christmas!
Title: Re: LWJGL in NetBeans (Leopard)
Post by: jomaveger on December 22, 2008, 11:27:51
Sorry, it works just now. I needed to put the native libraries in a system directory.

Thank you!
Title: Re: LWJGL in NetBeans (Leopard)
Post by: Matzon on December 22, 2008, 11:42:03
no! - never put them in system libraries - EVER. use: -Djava.library.path=/Usuarios/jomaveger/Projects/Libraries/LWJGL2.0.1/native/macosx/ <--- notice, just the dir - not the specific file
Title: Re: LWJGL in NetBeans (Leopard)
Post by: jomaveger on December 22, 2008, 12:10:32
Hello Matzon.

I've deleted the files from the system directory and I've done what you said. Thanks for your suggestion but I get the same error message.

Regards.
Title: Re: LWJGL in NetBeans (Leopard)
Post by: broumbroum on December 31, 2008, 22:15:53
-J-Djava.library.path=/Usuarios/jomaveger/Projects/Libraries/LWJGL2.0.1/native/macosx/ should work
Title: Re: LWJGL in NetBeans (Leopard)
Post by: hucky on March 22, 2009, 12:41:06
i have exactly the same problem on Leopard/Netbeans 6.5

Unrecognized option: -J-Djavac.library.path=/Users/hucky/java/Jme/lib/lwjgl/native/macosx/
Could not create the Java virtual machine.
Java Result: 1

im using jME 2 -> http://www.jmonkeyengine.com, LWJGL is there included

altrough it would be easier to put them in a systemdirectory?  :-\
Title: Re: LWJGL in NetBeans (Leopard)
Post by: Ciardhubh on March 22, 2009, 14:24:00
Unrecognized option: -J-Djavac.library.path=/Users/hucky/java/Jme/lib/lwjgl/native/macosx/

It should be: -Djava.library.path=...

No -J, no javaC.
Title: Re: LWJGL in NetBeans (Leopard)
Post by: hucky on March 23, 2009, 09:18:44
thank you! this little "c" costed me hours!

but now it runs!  ;D