views:

55

answers:

1

I have several packages in my Netbeans project.

One of these packages has a main method, which is set as the main method for the project.

I use clean and build and the Jar is created successfully, however when I try and run the .jar file The application does not run correctly.

The Main.class that I am running has buttons that create instances of other classes which are in other packages within the project, however when I run it from the command line clicking the buttons usually prints null or an exception out the the console. How would I set up Netbeans so that the .jar runs successfully?

A: 

Do you have any input parameters that you don't pass ?

kovica
No there aren't.
James
Set your project as a main project and press F6, thesn you should be able to select the proper class to run from there. This should also take care of your classpath.
kovica