run shell command from java

后端 未结 2 933
孤街浪徒
孤街浪徒 2020-11-28 15:23

I am working on an application an have an issue about running shell command from java application. here is the code:

public String execRuntime(String cmd) {
         


        
2条回答
  •  猫巷女王i
    2020-11-28 16:10

    first make a string
    String cmd="/export/home/test/myapp -T \"some argument\"";
    then run cmd in proc

提交回复
热议问题