Start from within platform vs. extern


i am new to JME and have a problem (running jMonkeyPlatform on windows vista):

I am loading models at start, as long as i start the game from within jMonkeyPlatform, everything works fine, but if i make a build and start it from its ‘dist’ directory by double clicking the jar, after the jmonkey config dialog, a black window appears for short and then the window goes away and thats it.

I am not 100% sure, but i think it is not finding the model data and therefor exiting with a null pointer exception. What do i have to do to start it from outside of jMonkeyPlatform?

It should work by just building the jMP project and double-clicking the jar file. Is the model an ogrexml file? If yes, then it will not be included in the distributed game, you should convert it to j3o before so the user do not have to wait for a conversion going on at the start of your game. If you want to include it for testing purposes, you can modify the exclude settings for the distribution in the project settings (right-click project).

Otherwise… Did you create this project in jMP or in NetBeans before? Only jMP projects do the necessary “magic” to add the assets to the dist project. Is there an assets.jar in your dist/lib directory? Also, did you try “clean and build” instead of just building?



well, knowing it should work i investigated a bit further and found out what happened…

the models name: “siderotor.j3o”

loaded with: “sideRotor.j3o” (capital R)

now when fixed it works… interesting though, that it does work within jMonkeyPlatform.

Ah, ok :slight_smile: Its because your filesystem is not case sensitive while the java classpath is. When starting in jMP, the assets folder is used, when starting the jar, the assets are packed in a jar and added to the classpath.

Good to hear you fixed your problem.