aspose file tools*
The moose likes Beginning Java and the fly likes How to stop Executable Jar file using batch file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to stop Executable Jar file using batch file?" Watch "How to stop Executable Jar file using batch file?" New topic
Author

How to stop Executable Jar file using batch file?

Edward Durai
Ranch Hand

Joined: Oct 09, 2004
Posts: 223
Hello,

I have created 1 batch file named as Start.bat, for running executable jar file. That command looks like

java -jar ExecutableJarFileName.jar

When I run the Start.bat, It's opening and running. That's fine.

But if I want to close that window/ exit that window, What command, I have to use.

Please advise.


Thank You<br />Edward
Guido Sautter
Ranch Hand

Joined: Dec 22, 2004
Posts: 142
There are several options here:

1. Close the window and call System.exit() in the jar file

2. Press Ctrl-C in the command prompt the batch is running in

3. Close the command prompt the batch is running in

Hope that helps.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to stop Executable Jar file using batch file?