I'm trying to launch JBoss from a Java app using Runtime. Here's a stripped-down sample:
public class runjboss
{
public static void main(String[] args)
{
try
{
Runtime.getRuntime().exec("/usr/local/jboss/jboss/bin/run.sh &");
while (true)
Thread.currentThread().sleep(10000);
}
catch (Exception e)
{
System.out.println("foo");
}
}
}
JBoss will spin up and run full blast for about 5-7 seconds, and then will just grind to a halt. Once I kill the java app that launched it, all of a sudden JBoss starts up again and completes its launch.
I can't figure out why JBoss is unhappy, or how it even knows that this other, totally unrelated app quits.
Any ideas? Thanks.
Avi
BTW, it's doing this on Mac OS X (Java 1.4.1) and also on SunOS 5.8. So it's not a platform Java issue...