Here you can find the source of fileExecute(String path)
public static void fileExecute(String path)
//package com.java2s; //License from project: Open Source License import java.io.IOException; public class Main { public static void fileExecute(String path) { //String command = "cmd /c start " + "\"" + path + "\""; try {/* w w w . j a va2 s . com*/ Process child = Runtime.getRuntime().exec(new String[] { "cmd.exe", "/c", path }); } catch (IOException e) { e.printStackTrace(); } } }