eimhee 发表于 2013-1-27 04:45:12

使用java启动notepad打开一个文本文件

老有人问,其实很简单的,就一行
<div class="highlighter">
[*]Process p1 = Runtime.getRuntime().exec("notepad d:\\1234.txt");
[*]Process p2 = Runtime.getRuntime().exec("cmd /c notepad d:\\1234.txt"); 
[*]Process p3 = Runtime.getRuntime().exec("cmd /c start notepad d:\\1234.txt"); 
页: [1]
查看完整版本: 使用java启动notepad打开一个文本文件