Why am i not able to run this program ?
When i exec a single process it works fine but when i try to execute array of commands i couldn't it complies but doesn't execute any 1 of the commands.
Please let me know
import java.io.IOException;
class RunTime
{
public static void main(String raja[])
{
Runtime r = Runtime.getRuntime();
Process p;
String[] commands = { "notepad","calcic","mspaint"};
System.out.println("Executing processes please wait........");
try
{
int commandslength = commands.length;
for(int i = 0 ; i < commandslength ; i++)
p = r.exec("commands");
}
catch(Exception e)
{
System.out.println("Cant proceed furthur ..");
}
}
}

