Close a batch file after running the jar file

前端 未结 2 1152
悲哀的现实
悲哀的现实 2020-12-09 05:17

I wrote a batch file that runs a jar file. But after it runs the jar file the batch file doesn\'t close until the jar file is also closed. How can I close the command screen

相关标签:
2条回答
  • 2020-12-09 05:58

    Use the start command before the rest of the command.

    0 讨论(0)
  • 2020-12-09 06:06

    I have recently had this problem and for someone other in future, complete and simple way is here:

    @echo off
    start javaw -jar "nameOfJar.jar"
    exit
    

    This starts jar and close CLI.

    Important is the "start" command and the "javaw" command for windows environment.

    0 讨论(0)
提交回复
热议问题