⑴ java如何调用exe文件
public class transferExe {x0dx0a public static void main(String[] args) {x0dx0a openWinExe();x0dx0a openExe();x0dx0a }x0dx0a //烂前蔽用 Java 调用windows系统的exe文饥州件,比如notepad,calc之类x0dx0a public static void openWinExe() {x0dx0a Runtime rn = Runtime.getRuntime();x0dx0a Process p = null;x0dx0a try {x0dx0a String command = "notepad";x0dx0a p = rn.exec(command);x0dx0a } catch (Exception e) {x0dx0a System.out.println("Error win exec!");x0dx0a }x0dx0a }x0dx0a //调用悔宽其他的可执行文件,例如:自己制作的exe,或是 下载 安装的软件.x0dx0a public static void openExe() {x0dx0a Runtime rn = Runtime.getRuntime();x0dx0a Process p = null;x0dx0a try {x0dx0a p = rn.exec("\"D:/QQ2010.exe\"");x0dx0a } catch (Exception e) {x0dx0a System.out.println("Error exec!");x0dx0a }x0dx0a }x0dx0a }