Runtime.exec on argument containing multiple spaces

前端 未结 8 873
闹比i
闹比i 2020-11-30 15:15

Can anyone make the following run?

public class ExecTest {
  public static void main(String[] args) {
    try {
      //Notice the multiple spaces in the arg         


        
8条回答
  •  醉酒成梦
    2020-11-30 15:45

    Always use Runtime.exec(String[]), not Runtime.exec(String) unless the command line is extremely simple.

提交回复
热议问题