How to write app class for proc run?

2004-10-07 Thread None None
So far I have this... But I cant seem to get it to stop when I execute it...
Thanks
public class Executer
{
private static Executer daemon = null;
private boolean state = false;
public static void main(String[] args)
{
   if(daemon == null)
   {
   daemon = new Executer();
try
{
daemon.init();
   }
catch(Throwable t)
{
t.printStackTrace();
return;
   }
   }
if(args.length  0)
if(args[0].equals(start))
daemon.start();
else if(args[0].equals(stop))
daemon.stop();
}
public void init()
{
state = true;
}
public void start()
{
while(state)
{
System.out.println(Running...);
try
{
Thread.sleep(1000);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
}
}
public void stop()
{
state = false;
}
}
_
Scan and help eliminate destructive viruses from your inbound and outbound 
e-mail and attachments. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSNĀ® Premium right now and get the 
first two months FREE*.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Sample app for procrun.

2004-10-06 Thread None None
Hey am trying to implement a sample application that runs a loop until I 
stop it! Does any one hve a sample class and app to show how to do this! I 
tried reading the boostrap class of tomcat but there is to much code to look 
just to get around to the proc run stuff!

Thanks
_
Powerful Parental Controls Let your child discover the best the Internet has 
to offer. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSNĀ® Premium right now and get the 
first two months FREE*.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]