I am trying to execute a label cmd comand from java, but when I call exec and wait for the end of the process it freezes. What do you think is the problem?
String[] comand = {"cmd.exe","label D: CIAO"};
Runtime rt = Runtime.getRuntime();
Process proc;
try {
proc = rt.exec(comand);
int exitCode=proc.waitFor();
System.out.println(exitCode);
} catch (IOException e) {
e.printStackTrace();