Launch .jar files with command line arguments (but with no console window)

后端 未结 3 1365
春和景丽
春和景丽 2021-01-18 03:09

I have to do a demo of an application, the application has a server.jar and client.jar. Both have command line arguments and are executable. I need to launch two instances o

3条回答
  •  没有蜡笔的小新
    2021-01-18 04:12

    Found the solution, below is the contents of my batch file

    @echo off
    
    start /B server.jar [arg1] [arg2]  
    start /B server.jar [arg3] [arg4]
    
    start /B client.jar [arg5]
    start /B client.jar [arg6]
    
    @echo on
    

    this opens, runs all the commands and closes the window, does not wait for the command to finish.

    I am still not sure how to prevent the window from opening completely.

提交回复
热议问题