This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply 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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to stop Executable Jar file using batch file?
 
Similar Threads
problem starting up tomcat
urgent-help please
Running jar files on linux
Ant tool?
Hiding Command Console Window while using appletviewer