Launch 2 applications sametime windows

Discussion in 'Java' started by bigbinc, Jun 23, 2004.

  1. bigbinc

    bigbinc Guest

    I want to launch two java applicafions at the same time in windows.

    I have a linux script that launches the first application, the
    server, in the background, waits 5 seconds then launches the client,
    can I do something similar in windows.

    My first thought is write a script that launches two other *.bat
    files,

    My second thought is write a small java application that forks two
    java VMs similar to what ANT does.

    My third is to write a windows C application, but I am scared about
    portability with windows versions?(COM?)

    My fourth is to screw windows it sucks, let those users screw
    themselves.


    I dont want to use the Services yet.
    bigbinc, Jun 23, 2004
    #1
    1. Advertising

  2. bigbinc wrote:

    > I want to launch two java applicafions at the same time in windows.
    >
    > I have a linux script that launches the first application, the
    > server, in the background, waits 5 seconds then launches the client,
    > can I do something similar in windows.


    I think all you need is javaw.exe instead of java.exe
    Michael Borgwardt, Jun 23, 2004
    #2
    1. Advertising

  3. bigbinc

    Eric Sosman Guest

    bigbinc wrote:
    > I want to launch two java applicafions at the same time in windows.
    >
    > I have a linux script that launches the first application, the
    > server, in the background, waits 5 seconds then launches the client,
    > can I do something similar in windows.
    >
    > My first thought is write a script that launches two other *.bat
    > files,
    >
    > My second thought is write a small java application that forks two
    > java VMs similar to what ANT does.
    >
    > My third is to write a windows C application, but I am scared about
    > portability with windows versions?(COM?)
    >
    > My fourth is to screw windows it sucks, let those users screw
    > themselves.
    >
    >
    > I dont want to use the Services yet.


    Others have suggested ways of doing exactly what you
    asked for, but I'm wondering: Is there some special reason
    you actually need two JVMs? Could you simply run the two
    applications in two threads in one JVM?

    --
    Eric Sosman, Jun 23, 2004
    #3
  4. bigbinc

    bigbinc Guest

    Eric Sosman <> wrote in message news:<>...
    > bigbinc wrote:
    > > I want to launch two java applicafions at the same time in windows.
    > >
    > > I have a linux script that launches the first application, the
    > > server, in the background, waits 5 seconds then launches the client,
    > > can I do something similar in windows.
    > >
    > > My first thought is write a script that launches two other *.bat
    > > files,
    > >
    > > My second thought is write a small java application that forks two
    > > java VMs similar to what ANT does.
    > >
    > > My third is to write a windows C application, but I am scared about
    > > portability with windows versions?(COM?)
    > >
    > > My fourth is to screw windows it sucks, let those users screw
    > > themselves.
    > >
    > >
    > > I dont want to use the Services yet.

    >
    > Others have suggested ways of doing exactly what you
    > asked for, but I'm wondering: Is there some special reason
    > you actually need two JVMs? Could you simply run the two
    > applications in two threads in one JVM?



    Ok, assume two java applications have 2 static main methods

    public static void main(){}

    I am already having trying to avoid deadlock with one of the
    applications and keeping up with all the other threads, I am trying to
    avoid starting the application in 2 threads. But, If I were to do so,
    what would be the best way to go about this :


    public static void main(String [] args) {

    App01.main(args);
    App02.main(args);

    }
    bigbinc, Jun 24, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wolfgang
    Replies:
    5
    Views:
    1,460
    Tris Orendorff
    Feb 19, 2004
  2. Gilly
    Replies:
    6
    Views:
    415
    Ken Starks
    May 4, 2008
  3. Mel
    Replies:
    6
    Views:
    431
    MLightsOut
    Aug 28, 2009
  4. laredotornado
    Replies:
    7
    Views:
    1,331
    Eric Sosman
    Dec 4, 2009
  5. Jan
    Replies:
    0
    Views:
    157
Loading...

Share This Page