user290043
user290043

Reputation:

How to start JAR in separate window from a .bat script?

I need to start a jar file with a *.bat file so that as it executes the Java command, it detaches from the terminal window (command prompt) and does not block the rest of the script. Is this possible? If so, how?

Thanks!

Upvotes: 6

Views: 9312

Answers (2)

user330315
user330315

Reputation:

java.exe will always display a terminal window, you need to use javaw.exe instead:

start javaw -jar myjarfile.jar

Upvotes: 10

Adam Paynter
Adam Paynter

Reputation: 46928

start /B java -jar myjarfile.jar

Upvotes: 1

Related Questions