Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Launch 2 applications sametime windows

Reply
Thread Tools

Launch 2 applications sametime windows

 
 
bigbinc
Guest
Posts: n/a
 
      06-23-2004
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.
 
Reply With Quote
 
 
 
 
Michael Borgwardt
Guest
Posts: n/a
 
      06-23-2004
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
 
Reply With Quote
 
 
 
 
Eric Sosman
Guest
Posts: n/a
 
      06-23-2004
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?

--
http://www.velocityreviews.com/forums/(E-Mail Removed)

 
Reply With Quote
 
bigbinc
Guest
Posts: n/a
 
      06-24-2004
Eric Sosman <(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> 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);

}
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use multiple instances of the same COM object at the sametime Jan Python 0 03-22-2013 06:13 PM
Possible to create an array and call object constructors at the sametime? laredotornado Java 7 12-04-2009 10:21 PM
Multiuser website - Possiblity of two users clicking submit at sametime Mel ASP .Net 6 08-28-2009 12:42 PM
Real Time Midi File Playback - Reading and Writing midi at the sametime Gilly Python 6 05-04-2008 09:16 PM
IBM Lotus Sametime Question Doug Computer Security 0 01-22-2004 02:07 AM



Advertisments