Error: org.lwjgl.Sys.setProcessPriority(I)V

I’ve finaly somehow got jME installed. Eclipse doesn’t find it in the lib directories so I told it to use it as an external jar file. Too, I couldn’t compile it myself because Eclipse said it had found 844 Errors.



It now compiles the first tutorial from the “Learning jME” pdf.

import com.jme.app.SimpleGame;

import com.jme.scene.shape.Box;

import com.jme.math.Vector3f;



public class HelloWorld extends SimpleGame

{

   public static void main(String[] args)

   {

      HelloWorld app = new HelloWorld();

      app.setDialogBehaviour(SimpleGame.ALWAYS_SHOW_PROPS_DIALOG);

      app.start();

   }



   public void simpleInitGame()

   {

      Box b = new Box(“MyBox”, new Vector3f(0,0,0), new Vector3f(1,1,1));

      rootNode.attachChild(b);

   }

}





Then the “Select display settings” dialog pops up, but the jME Logo as shown in the PDF is missing. After clicking OK the window is generated and closes immediately.



Here’s the console output:

26.02.2005 13:28:10 com.jme.app.BaseGame start

INFO: Application started.

26.02.2005 13:28:10 com.jme.system.PropertiesIO <init>

INFO: PropertiesIO created

26.02.2005 13:28:10 com.jme.system.PropertiesIO load

INFO: Read properties

26.02.2005 13:30:51 com.jme.system.lwjgl.LWJGLDisplaySystem <init>

INFO: LWJGL Display System created.

26.02.2005 13:30:51 com.jme.system.PropertiesIO save

INFO: Saved properties

26.02.2005 13:30:51 com.jme.system.lwjgl.LWJGLDisplaySystem <init>

INFO: LWJGL Display System created.

26.02.2005 13:30:52 com.jme.renderer.lwjgl.LWJGLRenderer <init>

INFO: LWJGLRenderer created. W:  800H: 600

26.02.2005 13:30:52 com.jme.renderer.AbstractCamera <init>

INFO: Camera created.

java.lang.NoSuchMethodError: org.lwjgl.Sys.setProcessPriority(I)V

   at com.jme.util.lwjgl.LWJGLTimer.<init>(Unknown Source)

   at com.jme.util.Timer.getTimer(Unknown Source)

   at com.jme.app.SimpleGame.initSystem(Unknown Source)

   at com.jme.app.BaseGame.start(Unknown Source)

   at HelloWorld.main(HelloWorld.java:11)

26.02.2005 13:30:52 com.jme.app.SimpleGame cleanup

INFO: Cleaning up resources.

26.02.2005 13:30:52 com.jme.app.BaseGame start

INFO: Application ending.

If you want the monkey picture to display you need to have the monkey.tga file located in jmetest/data/images in your path. So if you made a new project for the testing just copy the jmetest folder over to the root of your new project and the monkey picture should come up.



As for the other error, are you sure you have lwjgl.dll and .jar in your path? You need to include all the .jar files in the eclipse project by right clicking on your project going to properties and the clicking on java build path.



Click on the libraries tab and check to make sure you have added



jme.jar

lwjgl.jar

jogg.jar and

jorbis.jar



To get the dll file in your path you can either add it using the -D flag in the java command or do what I do and just add it to my system path. In windows 2000/XP you go to start-> control panel -> system -> advanced -> environment variables



Then either add a new variable called PATH and put in the path to your dll file or add the path to your dll file to the existing variable PATH.



Hope that helps.

"shochu" wrote:
As for the other error, are you sure you have lwjgl.dll and .jar in your path?
Yes, I've tested the Nehe Tutorials up to Lesson 05 and they work.

make sure you are using the correct version of lwjgl. If you have jme .8, you need lwjgl .94

"renanse" wrote:
make sure you are using the correct version of lwjgl. If you have jme .8, you need lwjgl .94

I've installed 0.95...
Could that be causing my problems?
Should I install LWJGL 0.94, can I install both at the same time and when will jME for LWJGL 0.95 be released?

“installing” lwjgl can just consist of having the .dll in the working dir of your app and the jar in your classpath, so having multiple versions of lwjgl on your box is easy. Yes, you need .94… .95 changed a few method signatures without deprecating the old ones and so it won’t work with jME. That’s probably also one reason why eclipse reports errors, although that’s way too many and you probably have something else going on there.



As for when we’ll upgrade to .95… Soon after GDC I’m sure (so, mid March)

I first downgraded LWJGL to 0.94 and then to 0.93 and now it works.



Thanks for all the help.

O, btw.:

I put all LWJGL and jME Files into one external directory instead of the bin and lib directories and it now works.