using this code:
private String executeCommand(String cmd ) {
Process p;
try {
p = Runtime.getRuntime().exec(cmd);
BufferedReader br = new BufferedReader(
new InputStreamReader(p.getInputStream()));
while ((commandlineOutput = br.readLine()) != null){
System.out.println("line:" + commandlineOutput);
}
p.waitFor();
System.out.println (p.exitValue());
p.destroy();
} catch (Exception e) {}
}
return commandlineOutput;
}
I run into the following problem: all commands that generate some output are executed normal, but some commands not generating output are not executed for instance : rm *.jpg is not working but mkdir is, I can not see the difference
I am quite a newbie, googled quite some time but this particular problem is never mentioned please help me out thanks