gcc/libjava/testsuite/libjava.lang/Process_6.java
David Daney faa03cf1b4 Process_1.java: New test.
2004-08-03  David Daney  <ddaney@avtrex.com>

	* testsuite/libjava.lang/Process_1.java: New test.
	* testsuite/libjava.lang/Process_2.java: New test.
	* testsuite/libjava.lang/Process_3.java: New test.
	* testsuite/libjava.lang/Process_4.java: New test.
	* testsuite/libjava.lang/Process_5.java: New test.
	* testsuite/libjava.lang/Process_6.java: New test.
	* testsuite/libjava.lang/Process_1.out: Expected result.
	* testsuite/libjava.lang/Process_2.out: Expected result.
	* testsuite/libjava.lang/Process_3.out: Expected result.
	* testsuite/libjava.lang/Process_4.out: Expected result.
	* testsuite/libjava.lang/Process_5.out: Expected result.
	* testsuite/libjava.lang/Process_6.out: Expected result.

From-SVN: r85881
2004-08-12 16:24:56 +00:00

32 lines
528 B
Java

// Create a running process for a non existent executable.
// Verify that IOException is thrown.
import java.io.IOException;
public class Process_6
{
public static void main(String[] args)
{
try
{
int c;
Runtime r = Runtime.getRuntime();
String[] a = { "blablabla_failure" };
try
{
Process p = r.exec(a);
System.out.println("bad");
}
catch (IOException ioe)
{
System.out.println("ok");
}
}
catch (Exception ex)
{
System.out.println(ex.toString());
}
}
}