public class ExecuteFile {
publicstatic void main(String[] args){
String f="../MyApp/phone.txt";//绝对路径:E:/我的文档/我的文档/java/MyApp/phone.txt //注意是'/'而不是'\'
try{
Runtimer=Runtime.getRuntime();
r.exec("cmd /c start"+f);
}catch(Exception e){}
}
}
本文出自 “Xhinker” 博客,请务必保留此出处http://xhinker.blog.51cto.com/640011/134162