Can't compile jme projects

jme worked for a while, but for some reason I started getting this error when I try to run a jme program:


init:
deps-jar:
compile:
run:
Exception in thread "main" java.lang.NoClassDefFoundError: com/jme/app/BaseSimpleGame
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)


Additional Info:

I just updated jme-physics, could that have anything to do with it?

Try updating jME from CVS.

Still not working.  :frowning:

is the build file in the correct directory - look at the build.xml and ensure that the paths it uses are available from the directory of the build file

sorry, i'm a newb.  can you explain that in simpler terms?

suggest delete all files that you have brought from cvs and get them again.

The error you are getting is related to the java VM not finding the JAR files for jME. In particular check the settings of your IDE, and the main project in your application.

OK, reinstalling jme from scratch worked, but I'm getting an error when I try to run a physics app:


init:
deps-jar:
compile-single:
run-single:
27-Sep-2007 6:31:30 PM com.jme.app.BaseGame start
INFO: Application started.
27-Sep-2007 6:31:30 PM com.jme.system.PropertiesIO <init>
INFO: PropertiesIO created
27-Sep-2007 6:31:30 PM com.jme.system.PropertiesIO load
INFO: Read properties
27-Sep-2007 6:31:30 PM com.jme.app.BaseSimpleGame initSystem
INFO: jME version 1.0 alpha
27-Sep-2007 6:31:30 PM com.jme.input.joystick.DummyJoystickInput <init>
INFO: Joystick support is disabled
27-Sep-2007 6:31:31 PM com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
27-Sep-2007 6:31:31 PM com.jme.system.lwjgl.LWJGLDisplaySystem getValidDisplayMode
INFO: Selected DisplayMode: 640 x 480 x 24 @52Hz
27-Sep-2007 6:31:32 PM com.jme.renderer.lwjgl.LWJGLRenderer <init>
INFO: LWJGLRenderer created. W:  640H: 480
27-Sep-2007 6:31:33 PM com.jme.app.BaseSimpleGame initSystem
INFO: Running on: null
Driver version: null
NVIDIA Corporation - GeForce4 Ti 4200/AGP/SSE2 - 1.5.8 NVIDIA 96.39
27-Sep-2007 6:31:33 PM com.jme.renderer.AbstractCamera <init>
INFO: Camera created.
27-Sep-2007 6:31:33 PM com.jme.util.lwjgl.LWJGLTimer <init>
INFO: Timer resolution: 1000 ticks per second
27-Sep-2007 6:31:33 PM com.jmex.physics.PhysicsSpace create
INFO: Using physics implementation 'com.jmex.physics.impl.ode.OdePhysicsSpace$OdeFactory'.
27-Sep-2007 6:31:33 PM com.jmex.physics.PhysicsSpace create
INFO: Physics implementation 'com.jmex.physics.impl.joode.JoodePhysicsSpace$JoodeFactory' not present.
27-Sep-2007 6:31:33 PM class physicstut.Main start()
SEVERE: Exception in game loop
java.lang.NoClassDefFoundError: org/odejava/Odejava
        at com.jmex.physics.impl.ode.OdePhysicsSpace.<init>(OdePhysicsSpace.java:309)
        at com.jmex.physics.impl.ode.OdePhysicsSpace$OdeFactory.create(OdePhysicsSpace.java:198)
        at com.jmex.physics.PhysicsSpace.create(PhysicsSpace.java:330)
        at com.jmex.physics.util.SimplePhysicsGame.initSystem(SimplePhysicsGame.java:90)
        at com.jme.app.BaseGame.start(Unknown Source)
        at physicstut.Main.main(Main.java:29)
27-Sep-2007 6:31:33 PM com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
27-Sep-2007 6:31:33 PM com.jme.app.BaseGame start
INFO: Application ending.
BUILD SUCCESSFUL (total time: 5 seconds)

You're still missing jars.



I don't use physics so I can't say exactly which but it's probably something like odejava.jar.  Basically make sure you've added all the jars you get with jME-Physics2 to the classpath as well as all the jME ones.

yeah, there is an odejava.jar somewhere down the imp/odejaval - directory

(and a native lib too)

I just reinstalled jme from scratch according to the instructions.  These are the classpaths:

-Djava.library.path="/home/noah/cvs/jme/lib":"/home/noah/cvs/jmephysics/impl/ode/lib"

In /home/noah/cvs/jmephysics/impl/ode/lib there is a odejava.dll and an odejava-jni.jar.

No that’s the native library path not the classpath.



You are missing jars from the Java classpath.



http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html