Netbeans Setup Troubles

-I'm new to using 3rd party java libraries and integrating them with the IDE "Netbeans in my case"

-But I followed the tutorial for netbeans and I seemed to have everything working.

-Jme and JAvaDoc compiled

-I ran the tests and they worked

-My program compiles

import com.jme.app.SimpleGame;
import com.jme.scene.shape.Box;
import com.jme.math.Vector3f;

/**
 * Started Date: Jul 20, 2004<br><br>
 * Simple HelloWorld program for jME
 *
 * @author Jack Lindamood
 */
public class Main extends SimpleGame {

    public static void main(String[] args) {
        Main app = new Main(); // Create Object
        // Signal to show properties dialog
        app.setDialogBehaviour(SimpleGame.ALWAYS_SHOW_PROPS_DIALOG);
        app.start(); // Start the program
    }

    protected void simpleInitGame() {
        // Make a box
        Box b = new Box("Mybox", new Vector3f(0, 0, 0), new Vector3f(1, 1, 1));
        rootNode.attachChild(b); // Put it in the scene graph
    }
}



-But when I try to run it I get a java.lang.NoClassDefFoundError and nothing shows up except that netbeans seems to think it was successful.
-Would also post the error but I recently tried to recompile jmonkey, and that failed, but I'll try starting from scratch later.
-Any insight is much appreciated.

P.S. I'm running windows and using Netbeans 6.0
and my reason for choosing Jmonkey is because I wanted a strong platform for game development, where I dont have to do as much work as I would with opengl alone

Hello Iceczd



Which Netbeans setup do You use to build jme ? The jme ant build script ? if yes which target ?



When setting up Your own project using jme, don't forget to add all the jme related .jar's to the classpath of Your project

and the directories containing the native .dll's to the library path.






I am using ant script to compile jme in Netbeans 6, although I don't really know much about it.



and I made sure all my jars and dll libraries were registered like in the tutorial and the stopped one error but I still get.



compile:

run:

java.lang.NoClassDefFoundError: and

Exception in thread "main"

Java Result: 1

BUILD SUCCESSFUL (total time: 0 seconds)



Which is really vague.



In the project properties,

I have the vm options setup for the required libs

-Djava.library.path=

Iceczd said:

java.lang.NoClassDefFoundError: and

Java tries to run a class named "and". You probably don't have that in your classpath :) Check your project settings again, you probably have an unquoted path like C:Documents and SettingsANYTHING in your java command call.

-Djava.library.path=

This is my VM settings I can see that the spaces would be a problem in the command line do I just fix it like


no, like hevee said the:
java.lang.NoClassDefFoundError: and


seem to be the problem.

So that would be the classpath not containing a class named "and"

I,d try and copy one of the jme - tests over to Your project, fix imports via context menue and see if it compiles and runs well.
If that's the case then You most probably screwed up the source in some way.

I got rid of my first problem, but now I get


init:
deps-jar:
compile:
run:
23-Dec-2007 11:36:46 AM com.jme.app.BaseGame start
INFO: Application started.
23-Dec-2007 11:36:46 AM com.jme.system.PropertiesIO <init>
INFO: PropertiesIO created
23-Dec-2007 11:36:46 AM com.jme.system.PropertiesIO load
WARNING: Could not load properties. Creating a new one.
23-Dec-2007 11:36:47 AM class bloodandmetal.Main start()
SEVERE: Exception in game loop
java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1030)
        at org.lwjgl.Sys$1.run(Sys.java:75)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:68)
        at org.lwjgl.Sys.loadLibrary(Sys.java:84)
        at org.lwjgl.Sys.<clinit>(Sys.java:101)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:111)
        at com.jme.system.lwjgl.LWJGLPropertiesDialog.<init>(Unknown Source)
        at com.jme.app.AbstractGame.getAttributes(Unknown Source)
        at com.jme.app.BaseGame.start(Unknown Source)
        at bloodandmetal.Main.main(Main.java:23)
23-Dec-2007 11:36:47 AM com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
23-Dec-2007 11:36:47 AM com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
23-Dec-2007 11:36:47 AM com.jme.app.BaseGame start
INFO: Application ending.
BUILD SUCCESSFUL (total time: 0 seconds)



This is all driving me crazy

I'm starting to think I should just put my project in the JME folder

Try this:

http://www.jmonkeyengine.com/jmeforum/index.php?topic=6709.0



Regards!