Name: yyT116575 Date: 03/09/2001
Solaris VM (build Solaris_JDK_1.2.1_04, native threads, sunwjit)
to
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)
/*
* @(#)BugTest.java 03/09/2001
*
*/
/**
* @author Neal Ho ###@###.###
* @version 1.0, 03/09/2001
* @since
*/
import java.io.*;
import java.math.*;
import java.sql.*;
import java.sql.Timestamp;
import java.text.*;
import java.util.*;
import java.util.Date;
public class BugTest
{
/**
* main
*/
public static void main(String args[]) throws Exception
{
int aCount = 0;
String aCommand[] = null;
int aWaitFor = 0;
Process aProcess = null;
while (true)
{
aCommand = new String[3];
aCommand[0] = "/usr/bin/ksh";
aCommand[1] = "-c"; // tell sh to use the next string as a shell command
aCommand[2] = " ls " ;
//Thread.currentThread().sleep(1000);
try
{
System.err.println("Test Bug");
aProcess = Runtime.getRuntime().exec(aCommand);
aWaitFor=aProcess.waitFor();
}
catch (IOException e)
{
e.printStackTrace();
}
System.out.println("The number of calls (" + ++aCount + ")");
}
}
}
(Review ID: 118517)
======================================================================