I'm trying to follow the tutorials, but when i run the game, Java never finds the image or model, even though i didn't change the original paths specified in the tutorials.
Try to first understand the conept of classloaders in java and ressourcelocators in jme, before you actually load a model. Also keep in mind that java is CaSeSeNsItIvE (while eclipse is not)
Well first of all, since it is a tutorial and i just Copy Pasted the code in my IDE, i don't think i would ever need to know anything, but just so you know, i do.
What might be the problem is java being case sensitive. It always slips out of my mind…i will check if that's the case…umm no it isn't. The path and the filename is correct.
Here's the whole log:
2010.24.2 18:04:24 com.jme.app.BaseGame start
INFO: Application started.
2010.24.2 18:04:24 com.jme.system.PropertiesGameSettings <init>
INFO: PropertiesGameSettings created
2010.24.2 18:04:24 com.jme.system.PropertiesGameSettings load
INFO: Read properties
2010.24.2 18:04:42 com.jme.system.PropertiesGameSettings save
INFO: Saved properties
2010.24.2 18:04:42 com.jme.app.BaseSimpleGame initSystem
INFO: jME version 2.0 Stable (r4093)
2010.24.2 18:04:42 com.jme.input.joystick.DummyJoystickInput <init>
INFO: Joystick support is disabled
2010.24.2 18:04:42 com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
2010.24.2 18:04:45 com.jme.renderer.lwjgl.LWJGLRenderer <init>
INFO: LWJGLRenderer created. W: 640 H: 480 Version: 2.1.0
2010.24.2 18:04:47 com.jme.app.BaseSimpleGame initSystem
INFO: Running on: ati2dvag
Driver version: 6.14.10.6925
ATI Technologies Inc. - ATI RADEON XPRESS 200 Series - 2.1.8544 Release
2010.24.2 18:04:47 com.jme.renderer.AbstractCamera <init>
INFO: Camera created.
2010.24.2 18:04:47 com.jme.util.lwjgl.LWJGLTimer <init>
INFO: Timer resolution: 1000 ticks per second
2010.24.2 18:04:47 com.jme.scene.Node <init>
INFO: Node created.
2010.24.2 18:04:47 com.jme.scene.Node <init>
INFO: Node created.
2010.24.2 18:04:47 com.jme.scene.Node <init>
INFO: Node created.
2010.24.2 18:04:47 com.jme.scene.Node attachChild
INFO: Child "Graph node" attached to this node "Stats node"
2010.24.2 18:04:47 com.jme.renderer.lwjgl.LWJGLTextureRenderer <init>
INFO: FBO support detected.
2010.24.2 18:04:47 com.jme.renderer.lwjgl.LWJGLTextureRenderer initCamera
INFO: Init RTT camera
2010.24.2 18:04:47 com.jme.renderer.AbstractCamera <init>
INFO: Camera created.
2010.24.2 18:04:47 com.jme.scene.Node <init>
INFO: Node created.
2010.24.2 18:04:47 com.jme.scene.Line <init>
INFO: Line created.
2010.24.2 18:04:47 com.jme.renderer.lwjgl.LWJGLTextureRenderer setupTexture
INFO: setup fbo tex with id 2: 640,360
2010.24.2 18:04:47 com.jme.scene.Node attachChild
INFO: Child "lineGraph" attached to this node "Graph node"
2010.24.2 18:04:47 com.jme.scene.Node attachChild
INFO: Child "f4" attached to this node "Graph node"
2010.24.2 18:04:47 com.jme.renderer.lwjgl.LWJGLTextureRenderer <init>
INFO: FBO support detected.
2010.24.2 18:04:47 com.jme.renderer.lwjgl.LWJGLTextureRenderer initCamera
INFO: Init RTT camera
2010.24.2 18:04:47 com.jme.renderer.AbstractCamera <init>
INFO: Camera created.
2010.24.2 18:04:47 com.jme.scene.Node <init>
INFO: Node created.
2010.24.2 18:04:47 com.jme.renderer.lwjgl.LWJGLTextureRenderer setupTexture
INFO: setup fbo tex with id 3: 640,120
2010.24.2 18:04:47 com.jme.scene.Node attachChild
INFO: Child "labelGraph" attached to this node "Graph node"
2010.24.2 18:04:47 class test.HelloWorld start()
SEVERE: Exception in game loop
java.lang.NullPointerException
at test.HelloWorld.simpleInitGame(HelloWorld.java:49)
at com.jme.app.BaseSimpleGame.initGame(BaseSimpleGame.java:545)
at com.jme.app.BaseGame.start(BaseGame.java:74)
at test.HelloWorld.main(HelloWorld.java:32)
2010.24.2 18:04:47 com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
2010.24.2 18:04:47 com.jme.app.BaseGame start
INFO: Application ending.
And this is the tutorial: http://www.jmonkeyengine.com/wiki/doku.php/starter:hello_modelloading
fabis94 said:
Well first of all, since it is a tutorial and i just Copy Pasted the code in my IDE, i don't think i would ever need to know anything, but just so you know, i do.
So you copy and paste code and expect binaries to pop up in your classpath?
it really depends how you set up your project in your ide.
if you use eclipse and added jme as a required project, it does work.
normen said:
fabis94 said:
Well first of all, since it is a tutorial and i just Copy Pasted the code in my IDE, i don't think i would ever need to know anything, but just so you know, i do.
So you copy and paste code and expect binaries to pop up in your classpath?
Since i followed the turorial since it's first page, it's quite obvious that i have my classpath set.
Anyways never mind, i fixed it.
It's is quite a "good" style to say "I fixed it" without giving a hint how you did it. Always keep in mind this is a forum where people that might have the same problem will find this thread and would like to see your sollution as well…
Hi there
I know its been 6 months since the last reply, but I have the same problem.
I’m using JMP and I’m following the tutorials, but I can’t locate some resources.
In the third tutorial, Hello Assets, I can’t locate the teapot model or the brick texture. I can’t find the ninja either (no joke here, hehe). But it can locate the default font in Interface/Fonts/Default.fnt (by the way, there is nothing in my project assets under Interface)
Well, there is nothing in my project assets (no ninja model, no teapot) so I put some spaceship model and it worked. My question is, are the ninja (or teapot) model provided with the jmp installation? Where are they located? I’m following the tutorials with other models, i was just wondering.
sorry about the question, i know it’s an stupid one.
Thanks!!
Right-click the project and open its properties, then under “libraries” add the jme3-test-data library.
I noticed this when I was going through the tutorial myself.
I believe there was an error in the path for the Ninja model.
It looks like the Wiki page has been corrected already, as I do not see the problem there any more.