I feel like this a pretty dumb ?, but I am trying to call a script in Linux. Code looks like this:
class callscript {
public static void main(
String args[]) throws Exception {
String item = "sh -c ./mescript";
Process proc = Runtime.getRuntime().exec(item);
int rc = proc.waitFor();
}
}
mescript is just supposed to do an 'ls -al'
It compiles and runs but no output.
I have tried to replace the String with 'sh -c ls' No luck.
Any ideas.
Thanks,
Bill Norton