I think I have read at least 20 or so of the posts, and have not seen this question answered yet.
I want to run 3 consecutive commands on the system.Is this valid?Code:Runtime rt = Runtime.getRuntime();
process pr = rt.exec("cdparanoia -w 1 track1; cdparanoia -w 2 track2");
p.waitFor();
I want to have linux execute mutiple bash commands one after another.
or should I loop it like so.
by the way I have read the pageCode:Runtime rt = Runtime.getRuntime();
String CommandString;
process pr;
for (int x=0;x<NumberOfTracks;x++)
{
CommandString="cdparanoia -w "+x+" track"+x;
pr = rt.exec(CommandString);
p.waitFor();
}
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html