- import java.io.File ;
- public class CallExe {
- public static void main(String[] args) {
- Runtime rt = Runtime.getRuntime();
- Process p = null;
- String fileLac = "";
- try {
- fileLac = "D:\\Program Files (x86)\\QQ.exe";//所调用的程序路径
- p = rt.exec(fileLac);
- } catch (Exception e) {
- System.out.println("open failure");
- }
- }
- }
- //该片段来自于http://www.codesnippet.cn/detail/1807201410019.html
来源: http://www.codesnippet.cn/detail/1807201410019.html