导航

2011年3月16日

摘要: 最近写的一个程序要在Linux下用到Runtime.getRuntime().exec(command),可是发现一个奇怪的问题。先看看代码: public static void main(String[] args) { try { String[] command = {"kill", "-9", "`ps -ef | grep '程序名' | awk '{print $2}'`"}; Process p = Runtime.getRuntime().exec(command); p.waitFo 阅读全文

posted @ 2011-03-16 12:26 teasp 阅读(1012) 评论(1) 推荐(0)