很简单,有时却总忘记。
String path = "C:/Documents and Settings/Administrator/桌面/SPX Editor/ge.exe";
try
{
Runtime.getRuntime().exec("cmd /c start excel \"" + path + "\"");
} catch (IOException e) {
e.printStackTrace();
}
本文提供了一种使用Java代码通过命令行启动指定路径下应用程序的方法,并给出了具体的代码实现。
很简单,有时却总忘记。
String path = "C:/Documents and Settings/Administrator/桌面/SPX Editor/ge.exe";
try
{
Runtime.getRuntime().exec("cmd /c start excel \"" + path + "\"");
} catch (IOException e) {
e.printStackTrace();
}
3796

被折叠的 条评论
为什么被折叠?