Java File

 根据文件所在的URl,打开文件

public static void main(String args[])throws IOException, InterruptedException
 {

      String file = "d:\\boot.ini";

  
   Process process=Runtime.getRuntime().exec("cmd /c "+file);
   
   int exitCode = process.waitFor();
          System.out.println("Process exit: " + exitCode);
 

}

你可能感兴趣的:(java,C++,c,C#)