简体   繁体   中英

The jar doesn't work properly… debugging post-build?

I'm in the dark as to how to even attack this particular problem and I have very little information to work with. Please bear with me.

My current project (a trading application) runs fine from Netbeans 6.9, and the build actually runs fine.. at first.. with `java -jar "my project.jar". It is a Swing application and everything comes up nicely. There are no error message in the terminal window.

However, when I engage the trading program itself (setting some of the threads into a more active state by clicking a command button), nothing happens. No error messages in the terminal, and none of the usual messages in the application. Like I said, it works fine from within Netbeans. Also, I've written other programs before using the same trading API (Interactive Brokers) and Swing, and haven't had this problem.

How do I even begin troubleshooting this problem?

I am admittedly build-stupid, meaning I have no idea how builds work and therefore no idea how to check if it is building properly.

I've checked /dist/lib and verified all of the libraries are present.

Thanks in advance for any suggestions.

This happens because your Application is throwing an exception in the background. Try to execute your app using cmd:

java -jar yourappname.jar

You will see the exception in the cmd console, then you only have to fix it.

Regards

Like Sean says, first check the JAR file to see if everything is there. Maybe the build is missing a file.

If that doesn't help, you can debug the application remotely. Here's a howto for Netbeans.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM