Assistance getting started with NetBeans and JME

As a complete Java newbie, this is probably the most basic of questions. I’m using Netbeans 4.1 and I have a really basic application that just creates a box:


public class Main extends SimpleGame {
   
    /** Creates a new instance of Main */
    public Main() {

    }
   
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Main app = new Main(); // Create Object
        app.setDialogBehaviour(SimpleGame.ALWAYS_SHOW_PROPS_DIALOG);
        app.start(); // Start the program
    }
    protected void simpleInitGame() {
        // Make a box
        Box box = new Box("Mybox",
                        new Vector3f(0,0,0),
                        new Vector3f(1,1,1));
        rootNode.attachChild(box);
    }
}



I can compile the source ok with Netbeans but running the app is a whole different story. I added the location of the JAR and DLLs files to the Run project settings using the options:

-Djava.library.path=C:jdkjrelib -cp C:jdkjrelib

But when I run I only get a successful build:

init: deps-jar: Compiling 1 source file to C:DevelopmentJavaApplication1buildclasses compile: run: BUILD SUCCESSFUL (total time: 0 seconds)[/build]

Obviously I’m missing something. Any suggestions appreciated!

Thanks[code]init:

deps-jar:

Compiling 1 source file to C:DevelopmentJavaApplication1buildclasses

compile:

run:

BUILD SUCCESSFUL (total time: 0 seconds)[/build]



Obviously I’m missing something. Any suggestions appreciated!



Thanks

Hm, if You intend to add a .jar to the classpath You’d give the .jar itself + path - not the dir it’s in (That’s ok with .dll)

But that missing should give You some error-message at least.

I have tried this extract of code in my NetBeans 4 and it works perfectly,

So it’s not the code…

How do you launch the app ? do you select the class, right click then run ?

if you select run project in the main menu you must specify a main class in your project properties…

If you’ve still got the problem, post your project properties, it will help to understand…



Hope this help,



bye,



Adenthar.

"do you select the class, right click then run ? "



Yes I’ve tried that, and I’ve also just clicked the Run button on the toolbar.



I’ll check the project properties tonight if I have time.



Thanks for your replies.

If I right click on the project and select "Run Project" it compiles and runs, but nothing happens. No errors.



The only projects properties I have set for "Run" are the VM options:



-Djava.library.path=C:jdkjrelib -cp C:jdkjrelib



THanks

I managed to get this basic app running in Eclipse - so I’ll try and stick with that for now, if I can work out the interface.



Except javaw is using 128Mb according to task manager! Yikes!



Thanks

Make sure you know what you are looking at because Eclipse is also javaw.exe in taskmanager. TestBoxColor runs at about 31-32MB on my machine whereas a fresh Eclipse is about 75-80MB and climbs from there.