- 失败
String mysql = "C:/Progra~1/Apache~1/Tomcat~1/a.exe";
Runtime.getRuntime().exec("cmd /c " + mysql);
真正的路径是 C:\Program Files\Apache Software Foundation\Tomcat 6.0\a.exe
- 成功
String mysql = "C:/Progra~1/Apache~1/a.exe";
Runtime.getRuntime().exec("cmd /c " + mysql);
真正的路径是 C:\Program Files\Apache Software Foundation\a.exe
为什么第一个不起作用?