Ray,

Nope - I cannot have the program running all the time because the port that 
it this program will connect to will be accessed by other programs too. So it 
needs to run only when the user is online and logged into the system.

Any ideas?

Prathap


---------- Original Message -----------
From: Ray Hauge <[EMAIL PROTECTED]>
To: php-general@lists.php.net
Cc: "Prathaban Mookiah" <[EMAIL PROTECTED]>
Sent: Thu, 26 Oct 2006 18:39:26 -0500
Subject: Re: [PHP] Running a Java Program

> On Thursday 26 October 2006 6:48 pm, Prathaban Mookiah wrote:
> > Hello List,
> >
> > I have a situation where, when the user logs into the system (Apache 2/PHP
> > 5.1/Win XP) the php script should activate a Java program to run in the
> > background. This program will keep running in the background while
> > everytime the user requests something, the subsequent php scripts
> > communicates with this Java program on a preassigned port. (This is for
> > controlling a robot I descibed in on of my earlier mails)
> >
> > My questions are:
> >
> > 1. How do I make the Java program to keep running even after the PHP 
script
> > terminates. In Linux I would have easily done using '&' - how about
> > windows?
> >
> > 2. What is the safest way to do it?
> >
> >
> > Thanks in advance.
> >
> > Prathap
> >
> > P.S - Richard & Tedd - I appreciate your comments on my previous issue.
> 
> Does the Java program HAVE to be started by a script?  I've worked 
> in a few places that had desktop apps that would just run on startup,
>  or a service, and then the webserver/php would communicate to it 
> since it's already running.  The downside to that is manual 
> intervention when the program stops.  Although... you could probably 
> to an exec() and if it was installed as a service you should be able 
> to run "net start <appname>' (or something like that.
> 
> I haven't kept up on your previous post so I may be completely wrong 
> ;)
> 
> -- 
> Ray Hauge
> Application Development Lead
> American Student Loan Services
> www.americanstudentloan.com
> 1.800.575.1099
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
------- End of Original Message -------

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to