Hi all,
I am trying to execute a windows command from within my java program, but I can't get it to execute the DOS command. Here's my code:
try {
Process p = Runtime.getRuntime().exec("cmd.exe /C cls");
} catch (IOException e) {
// catch exception
}
But, the code doesn't clear the screen, nor it gives any error. Can you please let me know, what I am doing wrong here?
Thanks,