简体   繁体   中英

Close the command prompt window programmatically

I have a set of commands in batch file which is used to run the JAR file.It is working perfectly.

After running the program, the command prompt window doesn't get closed. If I manually close the window, then the application closes as well.

So I want to close the command window without affecting the application.

thanks in advance.

Either use exit or make a new method to go to and have nothing in it. The exit way is better though. :)

My psychic debugging powers tell me you're launching the JAR file using a java command instead of a javaw command.

Use javaw instead and the command window will close when the batch file exits.

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