Problem to use : Runtime.getRuntime().exec(cdCmd);
Hi,
i have two files : test.java and output.java
both are in one folder named : myapp
--output.java
public class output
{
public static void main(String a[])
{
System.out.println("it's running.....");
}
}
//-
test.java--
import java.io.*;
public class test
{
public static void main(String a[])
{
String[] cdCmd = { "java output"};
try {
Runtime.getRuntime().exec(cdCmd);
}
catch (IOException ioe)
{
System.out.println(ioe.getMessage());
}
}
}
now , when i run....test.java file to see output of output.java class..it gives exception...
CreateProcess: "java output" error=2
what is problem?

