29.7.10

Open a Windows Folder on Windows Using Java

try {
String[] cmd = new String[5];

String url = "D:\\Program Files\\download";
cmd[0] = "cmd";
cmd[1] = "/c";
cmd[2] = "start";
cmd[3] = " ";
cmd[4] = url;

Runtime.getRuntime().exec(cmd);
} catch (IOException e) {
e.printStackTrace();
}

No comments: