Building game


I'va been working an a game using jme now for 3 months or so and it is nearly complete. Now I want to make a stand alone application of the game. I tried making a build file, but when I run my jar file (java -jar sms.jar) I get the message NoClassDefFoundError com/jmex/game/state/GameState.

Anyone got any idea of what i'm doing wrong.

Schilderen Met Slang is Dutch and means Painting with Snake. The game is for kids.

This is my build file:

<project name="Schilderen met Slang" default="compile" basedir=".">

Sounds like a classpath issue to me. 

You appear to be setting the classpath in the jar's manifest (without indentation it's hard to read!), but have you actually checked it to see if it's got all the jMG jar's?

As I was typing a reply I saw my mistake. I forgot to put my /lib folder in the same dir as the sms.jar file


sometimes it's good to just stop trying and do something else for a while. See the world outside my office and away from my computer  XD

After trying lost and lost of way of getting my app to work I keep running into problems.

I got the app running (I think), but I get an Error. After some searching the problem seems to be this code:

fileroot = ClassLoader.getSystemResource("").toString();

it returns null

When I run the app from eclipse there seems to be no problem, but when I run the .jar I get this error.

The same goes for


When I start the game with the ant build file it does work.

This way the game starts from the build folder which contains all the (compiled) .class files

build.xml code to start the game

<path id="classpath">
           <fileset dir="${lib}">
               <include name="*.jar"/>
           <pathelement path="${build}"/>

<target name="schilderenmetslang" description="Runs Schilderen met slang">
       <java classname="com.sms.SchilderenMetSlang"
            <jvmarg value="-Djava.library.path=${libs}"/>