Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent command line window exist after executing one command?

In a Windows bat file:

mvn.bat install
java -jar build.jar
pause

The command line window exist after executing mvn.bat install, how to let it proceed with execution of remain commands?

like image 260
Mike Avatar asked Jul 19 '26 10:07

Mike


1 Answers

I think your problem is that when you invoke mvn command you never go back to your script again.

Try using the call command e.g.:

call mvn install

This will invoke mvn install command and then return back to your script.

like image 104
Jayamohan Avatar answered Jul 21 '26 00:07

Jayamohan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!