While running the following program you can easily open directory that you like from Java Code.
// Comment package com.sabari; import java.io.IOException; public class opendirectory { public static void main(String[] args) throws IOException { String cmd = "cmd.exe /c start "; String file = "c:\\"; Runtime.getRuntime().exec(cmd + file); } }
Output Screen
No comments:
Post a comment