Open your System Directory From Java

While running the following program you can easily open directory that you like from Java Code.
// Comment
package com.sabari;


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 

test Web Developer

No comments:

Post a comment

Related Posts Plugin for WordPress, Blogger...