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 of server.jar and two instances of client.jar.
I thought that using a batch file was the way to go, but, the batch file executes the first command (i.e. >server.bat [argument1] [argument2]) and does not do anything else unless I close the first instance, in which case it then runs the 2nd command. And also the I do not want a blank console window to open (or be minimized)
What I really need is a batch script that will just launch these apps without any console windows and launch all instances that I need.
Thanks in Advance!
EDIT:
javaw:
works if I type the command into the console window individually. If I put the same in the batch file, it will behave as before. Console window opens, one instance starts (whichever was first) and it does not proceed further unless I close the application in which case it runs the 2nd command. I want it to run all commands silently
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.
Try:
javaw <args>
Alright after tring and cring, here goes my soluction
@echo off
start /B javaw -jar -Xms16m -Xmx512m client.jar
@echo on
I hope it will be usefull for somebody.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With