문제

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?

올바른 솔루션이 없습니다

다른 팁

"How would I set up Netbeans so that the .jar runs successfully?"

You don't. Once the jar and s built, it is, or should be, independent. NetBeans is not what's wrong with it.

You didn't specify where your NPEs are happening, but it's likely your application uses a certain file-structure, and that you're attempting to run the jar while not having or maintaining the files in the same positions or with the same names as when working with them within NB.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top