Launch .jar files with command line arguments (but with no console window)
        Posted  
        
            by Virat Kadaru
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Virat Kadaru
        
        
        
        Published on 2009-04-02T20:03:19Z
        Indexed on 
            2010/03/08
            12:06 UTC
        
        
        Read the original article
        Hit count: 393
        
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
SOLUTION: 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]
@echo on
this opens, runs all the commands and closes the window, does not wait for the command to finish.
© Stack Overflow or respective owner