Could not find the main class: jMonkeyOptions

Running a basic program from the command line, I get this result

[java]java.lang.NoClassDefFoundError: jMonkeyOptions

Caused by: java.lang.ClassNotFoundException: jMonkeyOptions

at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

Could not find the main class: jMonkeyOptions. Program will exit.

Exception in thread "main"[/java]

This is mysterious because there is no evidence of the class jMonkeyOptions existing anywhere (after some searching on google and this site).



The program is nothing more than this, which compiles fine:

[java]import com.jme3.app.SimpleApplication;

import com.jme3.material.Material;

import com.jme3.math.Vector3f;

import com.jme3.scene.Geometry;

import com.jme3.scene.shape.Box;

import com.jme3.math.ColorRGBA;



public class Main extends SimpleApplication

{

public static void Main(String args[])

{

Main app = new Main();

app.start();

}



@Override

public void simpleInitApp()

{

}



/@Override

public void simpleUpdate(float tpf)

{

}
/

}[/java]



Any ideas on why this error is occurring?

How do you run the program from command line? This looks like the jar manifest specifies a wrong class name. If you used jMP to create the application, make sure the correct main class is selected in the “run” section of the project properties.

Oh, I fixed this. It was just an error in the batch file I was using.

Haha, batch files, so I guess you are using Eclipse, never undstood why it fails to use tha jar manifest for the classpath xD