How to write a batch file to run multiple java programs....

Discussions

EJB design: How to write a batch file to run multiple java programs....

  1. Dear All,

            I had two java server prgs namely server1 and server2, which will be running on two different ports. Now i want to write a batch file, which runs these two servers at the same time. Can any one give the solution for this problem? I tried by writing the batch code as follows..
    java server1
    java server2
    when i execute the above batch file, server1 got started, but the server2 is waiting for the server1 to be stopped, which should not happen in my case.

    kindly give the solution for the above stated problem...

                                             Regards,
  2. You can use following code
    start java server1
    start java server2
    This will start the java applications in 2 different shell.

    Regards
    -Siddhartha

    > Dear All,
    >
    >         I had two java server prgs namely server1 and server2, which will be running on two different ports. Now i want to write a batch file, which runs these two servers at the same time. Can any one give the solution for this problem? I tried by writing the batch code as follows..
    > java server1
    > java server2
    > when i execute the above batch file, server1 got started, but the server2 is waiting for the server1 to be stopped, which should not happen in my case.
    >
    > kindly give the solution for the above stated problem...
    >
    >                                          Regards,
  3. I believe it is better to run by using javaw instead of java in batch mode.