Launch 2 applications sametime windows

B

bigbinc

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.
 
M

Michael Borgwardt

bigbinc said:
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
 
E

Eric Sosman

bigbinc said:
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?
 
B

bigbinc

Eric Sosman said:
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);

}
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top