Author Topic: HelloWorld Error  (Read 6036 times)

Offline san14

  • int
  • **
  • Posts: 60
    • View Profile
HelloWorld Error
« on: January 31, 2007, 08:54:54 am »
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

Code: [Select]
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]
« Last Edit: February 15, 2008, 03:09:26 am by san14 »
San14

Offline san14

  • int
  • **
  • Posts: 60
    • View Profile
Re: HelloWorld Error
« Reply #1 on: January 31, 2007, 12:18:18 pm »
Quote from: san14
HI 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

Code: [Select]
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)

« Last Edit: February 15, 2008, 03:10:20 am by san14 »
San14

Offline cyberkilla

  • float
  • ****
  • Posts: 413
    • View Profile
    • http://futurerp.net
HelloWorld Error
« Reply #2 on: January 31, 2007, 12:46:45 pm »
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

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11748
    • View Profile
    • http://www.jpct.net
HelloWorld Error
« Reply #3 on: January 31, 2007, 06:03:48 pm »
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.

Offline Melssj5

  • double
  • *****
  • Posts: 715
    • View Profile
HelloWorld Error
« Reply #4 on: February 01, 2007, 09:41:12 pm »
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

Offline san14

  • int
  • **
  • Posts: 60
    • View Profile
HelloWorld Error
« Reply #5 on: February 02, 2007, 11:07:52 am »
Thanx A lot your suggestion worked. I am able to see HelloWorld...
San14

Offline pcg

  • byte
  • *
  • Posts: 6
    • View Profile
    • http://www.plasticcowgames.com
Re: HelloWorld Error
« Reply #6 on: August 16, 2007, 09:23:17 pm »
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.

Offline Melssj5

  • double
  • *****
  • Posts: 715
    • View Profile
Re: HelloWorld Error
« Reply #7 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!
Nada por ahora

Offline pcg

  • byte
  • *
  • Posts: 6
    • View Profile
    • http://www.plasticcowgames.com
Re: HelloWorld Error
« Reply #8 on: August 16, 2007, 09:39:37 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?
« Last Edit: August 16, 2007, 09:43:47 pm by pcg »

Offline Melssj5

  • double
  • *****
  • Posts: 715
    • View Profile
Re: HelloWorld Error
« Reply #9 on: August 16, 2007, 09:44:42 pm »
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

Offline pcg

  • byte
  • *
  • Posts: 6
    • View Profile
    • http://www.plasticcowgames.com
Re: HelloWorld Error
« Reply #10 on: August 16, 2007, 10:01:02 pm »
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.