简体   繁体   中英

How to run Netbeans IDE Java Desktop Application from command line

I have created a Java desktop application and I want to run it from the command line. How should I do that ?

In the same way as you would run any other Java application from the command line. Depending on how it's packaged,

java -cp <classpath> fully.qualified.class.name

or

java -cp <classpath> -jar myapp.jar

also.. when you right click on your project and say clean and build you should get something like this

To run this application from the command line without Ant, try: java -jar "/home/nico/Workspace/testApplication1/dist/testApplication1.jar"

in the output window :)

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