New user woes... :(

After recently deciding to bring my Java game project into the third dimension, I started looking for a decent way of doing it and jMonkey stood out as the most accessible and feature-rich by far (I considered some of the available OpenGL bindings, but let’s face it; we only live once.). The problem is, my Java experience doesn’t really go beyond the standard Java APIs (Java2D, etc.) and I’ve been having a bit of trouble getting jME to actually work.



After finally getting the HelloWorld example to compile (forgot to tell Gel, my IDE, where lwjgl was) I have not been able to get the compiled code to run. The console window in Gel gave me the following output:


12-Jun-2005 17:59:34 com.jme.app.BaseGame start
INFO: Application started.
12-Jun-2005 17:59:34 com.jme.system.PropertiesIO <init>
INFO: PropertiesIO created
12-Jun-2005 17:59:34 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/LWJGLException
            at com.jme.app.AbstractGame.getAttributes(AbstractGame.java:180)
            at com.jme.app.BaseGame.start(BaseGame.java:57)
            at HelloWorld.main(HelloWorld.java:11)
12-Jun-2005 17:59:34 com.jme.app.SimpleGame cleanup
INFO: Cleaning up resources.
12-Jun-2005 17:59:34 com.jme.input.InputSystem getKeyInput
WARNING: KeyInput is null, insure that a call to createInputSystem was made before getting the devices.
12-Jun-2005 17:59:34 com.jme.input.InputSystem getMouseInput
WARNING: MouseInput is null, insure that a call to createInputSystem was made before getting the devices.
12-Jun-2005 17:59:34 com.jme.app.BaseGame start
INFO: Application ending.
Finished executing



I'm not sure what's causing these errors, but if anyone could help me out then that'd be fantastic. I'd hate to let this stumble at the first hurdle keep me from using what apears to be a particularly awesome engine!

again, lwjgl seems to be missing - be sure to have lwjgl.jar in the classpath → see other threads dealing with setup:

http://jmonkeyengine.com/jmeforum/viewtopic.php?t=1785

It’s for another IDE but the basic steps should be similar…

"irrisor" wrote:
again, lwjgl seems to be missing - be sure to have lwjgl.jar in the classpath -> see other threads dealing with setup:
http://jmonkeyengine.com/jmeforum/viewtopic.php?t=1785
It's for another IDE but the basic steps should be similar...

Ah, I found the problem; I'd set the classpath for compiling but not for running *doh*. I don't know how that could have come about (it's set to both by default)... Thanks for making me double-check that one!

Hardcore game development, millions of pounds, and a small island (or two) in the south pacific here I come! ;)

[edit] Ah, one problem; I'm led to believe that apps derived from SimpleGame have the framerate/no. of polys etc. displayed, but instead all I have is a white bar. I'm not entirely sure why it would do that.

A white bar means the font image is not in the running classpath. A lot of times this happens because your IDE is not setup to copy .tga files (or other types) during a build.

hi,



Apologies if this question sounds silly … but I am also seeing the white bar instead of the fps. How do you set your IDE to copy .tga (and others) during a build? I am using Eclipse 3.1.



Thanks in advance!



Cheers,

Hong Ngee

Ah, thanks people; I’ve got it all working now. Spiffy.



hntay; is the fps appearing when you run the jME examples? I’m not sure how you’d fix it in eclipse, but if the jME examples are working then do what they do!

In Eclipse, I usually add the src directory to the classpath :slight_smile: This enables finding the images at runtime without copying them.

Einheri:

no … the fpr is not appearing when i run the JME examples :frowning:



batman:

thanks for the input! :smiley:



So i am still stuck with the white bar … can someone help? Thanks!

Do you see the .tga file in your source tree in eclipse? My understanding is that any resource file in your src directory will be copied to the bin directory. Double check that the file exists in both paths.



If you have everything set up enough in Eclipse to be able to right click on a TestXXXX class and say Run as Java Application, then I don’t see any reason the font shouldn’t show up.

renanse:



I have setup Eclipse under the guidance of a post I found in the General forum. I have managed to get the examples to run with the fps showing at the bottom of the screen.



However, when I try to run a project that I created myself, with all the necessary jar files in the build path, there is still the white box/strip at the bottom where the fps should be showing.



I have tried to look for the file font.tga (which I understand is the file required for the fps to show up correctly) and I have only been able to find them in



./jme/scr/jmetest/data/font

./jme/bin/jmetest/data/font

./jme/build/jmetest/data/font



Am I missing something? :’(

"hntay" wrote:
renanse:

I have setup Eclipse under the guidance of a post I found in the General forum. I have managed to get the examples to run with the fps showing at the bottom of the screen.

However, when I try to run a project that I created myself, with all the necessary jar files in the build path, there is still the white box/strip at the bottom where the fps should be showing.

I have tried to look for the file font.tga (which I understand is the file required for the fps to show up correctly) and I have only been able to find them in

./jme/scr/jmetest/data/font
./jme/bin/jmetest/data/font
./jme/build/jmetest/data/font

Am I missing something? :'(

One solution might be to create a new package in the /src directory of the jME project for all of your personal projects (where the test packages are). I'm pretty sure that that'd be easy to do in eclipse (I'm not a user, but I've been looking at it lately and may well switch if I can stomach the download size), but I doubt that this is the best way of doing it.