Running Shell or System Command in JAVA

前端 未结 3 1040
执笔经年
执笔经年 2021-01-16 16:27
private void myFunction(String userName){
    String fileName = this.generateFile(userName);
    String[] command = new String[4];
    command[0] = \"cmd\";
    comm         


        
3条回答
  •  轮回少年
    2021-01-16 17:19

    At the risk of repeating myself I'm gonna say it again: java.lang.ProcessBuilder is much better option

提交回复
热议问题