Running a JME application

Hello,

I have a small program that I’ve finished a while ago for school but I can’t run it in any OS i’ve tried it on.

The application runs flawlessly in the JME3 IDE but after compiling it into Applet, Android, Windows and MacOS application it doesn’t run in any of these environments. Should I be editing the classpath or librarypath or is that taken care of by the JME IDE. My program uses only classes from the com.jme3.* libs (bullet, light, collision, scene, renderer) and then it uses niftygui from the de.lessvoid.nifty.Nifty; Could that be causing the problem. When I run in windows a window is opened then closed and nothing else happens.



The thing is I have a made a preliminary decision to use JME for my final project in college but my teachers told me until I can make sure I can deploy a game successfully for at least one of these OS I shouldn’t use this technology.



While I am at it. I need your opinion on something: Since JME3 is still in beta stages do you think it is good enough for me to do an online game? Not an mmo or anything but a small action game in an online world. Because that is what I have set out to da as my final project.

Any opinion is appreciated.

Thanks

AtomR

You’re gonna have to give more details than “it doesn’t run” if you want help. All of those options work for us and other people.

Are you seeing any errors? Have you tried running it as a Java/JAR application and seeing if there’s anything in the log?

Try reproducing this issue with a small test case that you can post here. Generally, if you do things the right way then JME deploys pretty flawlessly.



Usually if it runs in the IDE and not when deployed it’s because you are accessing files directly instead of using the assets folder or something to that effect.

@Momoko_Fan: I wish I had more info but as I said in my post, when I double click the .exe a window opens and then closes. No other errors are displayed. You mean run the java/jar from a console? I’ll have to check how to do that.



@pspeed: I have tried the samples and they run with no problem. So the problem is obviously with something I did.

You are correct in that I am loading a model from a zip by registering a zip locator in the assets manager in runtime. I didn’t know that would be a problem. I tried importing the model but I can’t because it lacks a .material file so that might be the problem. I’ll try creating a basic .matrial file and see if it works then.



Thank you both for your help.

Even though you registered a zip locator, that doesn’t mean that the .exe will have that bundled. Likely your zip is not found when you run the application as an .exe.



I’m not sure what you can’t just put the contents of the zip into the assets folder. It’s just a directory… it just happens to be a directory that is jar’ed and included with the .exe.



To run your game’s exe from the command line you can just do:

java -jar yourgame.exe



The exe is just a jar with exe headers (so that the OS knows how to run it).

It’s working now. I have replaced the model that was bundled in the zip (it was just a cylinder) with a Cylinder objecvt and the program runs perfectly in Windows and Mac. Thank you again for your help.