Problems not finding properties.cfg

Hi, I am using eclipse and have setup jme and have tried to run the HelloWorld example from the User Guide.



I get the following error:



May 4, 2005 2:24:25 PM com.jme.app.BaseGame start
INFO: Application started.
May 4, 2005 2:24:25 PM com.jme.system.PropertiesIO <init>
INFO: PropertiesIO created
May 4, 2005 2:24:25 PM com.jme.system.PropertiesIO load
WARNING: Could not load properties: java.io.FileNotFoundException: properties.cfg (The system cannot find the file specified)
java.lang.NoClassDefFoundError: org/lwjgl/opengl/Display
   at com.jme.system.lwjgl.LWJGLPropertiesDialog.<init>(Unknown Source)
   at com.jme.app.AbstractGame.getAttributes(Unknown Source)
   at com.jme.app.BaseGame.start(Unknown Source)
   at jmetest.helloWorld.main(helloWorld.java:24)
May 4, 2005 2:24:25 PM com.jme.app.SimpleGame cleanup
INFO: Cleaning up resources.
May 4, 2005 2:24:25 PM com.jme.input.InputSystem getKeyInput
WARNING: KeyInput is null, insure that a call to createInputSystem was made before getting the devices.
May 4, 2005 2:24:25 PM com.jme.input.InputSystem getMouseInput
WARNING: MouseInput is null, insure that a call to createInputSystem was made before getting the devices.
May 4, 2005 2:24:25 PM com.jme.app.BaseGame start
INFO: Application ending.



I tried changing the DialogBehaviour to FIRSTRUN_OR_NOCONFIGFILE_SHOW_PROPS_DIALOG but it comes up with the same error.

I also tried adding a (empty) properties.cfg file to my game path but then get the complaint:

...
WARNING: Properties file not complete.
...

And the app closes.

I tried searching the forums before posting and searching around the Wiki but couldnt find anything. Can someone please point out what I am doing wrong? I am using the 0.8 jar cause I dont feel brave enough atm to compile from cvs but maybe thats it so I may give that a go.

Thanks,

Chad

you need to download lwjgl 0.94 and add that to your classpath

Just a quick clarification: the warning about the properties dialog is unrelated to the underlying problem. The NoClassDefFoundError is the real issue. It means that the JVM can’t find the lwjgl classes - which are required by jME in order to run.



Whether or not you have a valid properties file is not an issue. jME will generate a new/correct one if one doesn’t exist or the current one is corrupt.

Ahh ok thanks Eric, I was pulling my hair out because I downloaded lwjgl 0.94 and still getting the same error.



I included all the .jar files under the Properties->Libraries tab and also put in a -Djava.library.path=c:javalwjgl94 into the VM Arguments under the Run… profile. Still getting the same error so I am wondering if I need to manually add the .jars to my classpath.



I have used other libraries successfully like swt and hssql and never had to play with classpath - only java.library.path but I realise this is different in that I am using a library that is dependant on another library for the first time. I am quite new to Java and Eclipse and any pointers would be helpful.



Thanks, Chad.

How… odd. Everything seems to be okay. You’ve included the jME and lwjgl jars, you’ve specified -Djava.library.path. I’m really not quite sure why it would complain about not being able to find the classes…



One thing to check: in the Classpath tab of the Run… profile, does it list lwjgl.jar somewhere? If not, then there’s some issue with Eclipse and including that jar.



Hrmm…

Ok I figured it out. ://. My jre’s were all installed under “c:Program Filesjava” and I had put jme.jar into the libext directory under there. Well eclipse is happy with that but obviously java runtime isnt. I moved the jme.jar to a dir with a ‘sane’ name and its all running fine now.



Thanks for the help guys! See you soon in the Graphics, Physics, Effects and GUI boards asking more newbie questions XD

I included all the .jar files under the Properties->Libraries tab and also put in a -Djava.library.path=c:javalwjgl94 into the VM Arguments under the Run... profile.


This has solved my trouble,thank u. Remember that you should put it under the VM arguments, and no in the program arguments section(like I did ).

The compiler does not search for the properties.cfg file. An executed application does, but it does not really need it. The file properties.cfg is created automatically. Despite the topic title the problem is not the properties.cfg file, it was the NoClassDefFoundError. Do you have that one, too? Which class is not found? Most likely you are missing another jar.