HelloWorld Error

Started by san14, January 31, 2007, 08:54:54 AM

Previous topic - Next topic

san14

HI When I am Runing HelloWorld example I am geting this error and it s not able to compile. I have kept lwjgl.jar in Java/jre/lib/ext and lib too but its giving error. I am able to runn JPCTDemo Demo on same editio I am using eclips 3.2. Can you help me out

With Regards
San14

Java version is: 1.5.0_08
-> support for BufferedImage
-> using BufferedImage
Software renderer (OpenGL mode) initialized
Software renderer disposed
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$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:108)
at com.threed.jpct.GLHelper.findMode(Unknown Source)
at com.threed.jpct.GLHelper.init(Unknown Source)
at com.threed.jpct.GLRenderer.init(Unknown Source)
at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
at HelloWorld2.doStuff(HelloWorld2.java:19)
at HelloWorld2.main(HelloWorld2.java:9)


[/quote]
San14

san14

#1
Quote from: san14HI When I am Runing HelloWorld example I am geting this error and it s not able to compile. I kept lwjgl.jar in Java/jre/lib/ext and lib too but its giving error. I am able to runn JPCTDemo Demo on same editio I am using eclipse 3.2. Can you help me out

With Regards
San14

Java version is: 1.5.0_08
-> support for BufferedImage
-> using BufferedImage
Software renderer (OpenGL mode) initialized
Software renderer disposed
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$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:108)
at com.threed.jpct.GLHelper.findMode(Unknown Source)
at com.threed.jpct.GLHelper.init(Unknown Source)
at com.threed.jpct.GLRenderer.init(Unknown Source)
at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
at com.threed.jpct.FrameBuffer.enableRenderer(Unknown Source)
at HelloWorld2.doStuff(HelloWorld2.java:19)
at HelloWorld2.main(HelloWorld2.java:9)


San14

cyberkilla

You need to add the path to the opengl library in eclipse.
I cannot remember how to do it, but it is on the lwjgl website:)
http://futurerp.net - Text Based MMORPG
http://beta.rpwar.com - 3D Isometric MMORPG

EgonOlsen

I usually add it in the application tab of the "run as"-dialog as a VM-Parameter like so: -Djava.library.path=<your path>\lwjgl-1.0b3\
There may be better ways, but i'm not using Eclipse except for testing some things, so i'm not really good in it.

Melssj5

Well, the xception means that the programm cannot find the dll reqired for the open gl render, you can put the dll on the windows\system32.dll if using windows or a better solution is to set a library path for you application as Egon does.
Nada por ahora

san14

Thanx A lot your suggestion worked. I am able to see HelloWorld...
San14

pcg

I use eclipse and have just had the same problem.
Just solved the problem so i thought i'd document the solution here for others.

Right click on the project and select the 'Build Path' option and then configure build path.
In the 'Java Build Path' section select the 'Add External JAR' option and locate the lwjgl.jar and add this.
Then right click on your source folder and select properties, then in the Native Library option add a path to the lwjgl folder.

Melssj5

"Then right click on your source folder and select properties, then in the Native Library option add a path to the lwjgl folder."

Native Library option doesnt exist or at least I cant find it by double clicking the source folder!
Nada por ahora

pcg

#8
Quote from: Melssj5 on August 16, 2007, 09:32:30 PM
"Then right click on your source folder and select properties, then in the Native Library option add a path to the lwjgl folder."

Native Library option doesnt exist or at least I cant find it by double clicking the source folder!

im using eclipse 3.2.2
I created the source folder by right clicking on the project the selecting New->Source Folder

If its a source folder, then when you right click and select properties there are 4 options to choose from on the left hand side. The bottom option is Native Library.

If you have just created a normal folder then the Native Library option is not available and i am only shown one option which is Info.
Could this be your problem?

Melssj5

Well I am using 3.1.1 its maybe that, on my source folder options there is:

Info

Javadoc location

Java source location

Maybe this is only implemented on the 3.2.2 version!
Nada por ahora

pcg

Nothing is never as simple as it seems :-\
I've had a quick google but i cant find anything on Native Library and 3.1.1
I have had the lwjgl stuff working before on an earlier version than 3.2.2 but i cant remember the version or how i did it which was why i thought id document it this time.