何白白

我的java开发记录


Project maintained by hjx601496320 Hosted on GitHub Pages — Theme by mattgraham

java代码执行系统命令

//这样写支持命令中的管道符
Process ps = Runtime.getRuntime().exec(new String[]{
    "/bin/sh",
    "-c",
    "ps -ef | java"
});