Make a new jME project...?

Hello,

i'm new to jME and read "getting started" and then started to read some of the beginner tutorials from the Page.

But i miss a step in between somehow… how do i set up a new project i'll put my jME code in? Do i have to create a new package in the src folder of the jME project or do i have to create a new project and link to jME somehow? (i'm working with eclipse)



thanks so far.

Just create a new project and organise the packages however you want.

When you are creating the project, on the Java Settings step, go into the projects tab, click add, and add jme.

Then you should be good to go I think.

Ok thanks,

but how do i create a working .jar file? because when i try to export and run it, it says i don't have a main class. (of course i did select one when exporting)

anyone have a clue what could be the problem here?

(the .jar file size is only 5 kb… its one of the "learning jme" tutorial codes)

i could upload the .jar if this helps.

If you’re trying to create a jar to run your application (which is what I’m assuming), I would recommend using FatJar (http://fjep.sourceforge.net/).  This way you can have all of your dependencies in one jar file.  I can’t quite remember if I had to do anything with the DLLs…

Serge said:

Ok thanks,
but how do i create a working .jar file? because when i try to export and run it, it says i don't have a main class. (of course i did select one when exporting)


Most likely a classpath/library path problem. At some point, I think we've all had headaches with this! You need to specify where your library files are (the jme jars) and the native dll's (for windows) are, so when you run the jar, it'll know where to look for those files.

Look at this wiki article for more information:

http://www.jmonkeyengine.com/wiki/doku.php?id=packaging_and_deploying_jme_applications

That article gives a nice description of multiple ways of deploying your program. I'd also look into java webstart, as I think it's a bit nicer than just dumping a bunch of jar files onto your users!