Java Runtime.getRuntime().exec 执行带空格命令解决办法

时间:2014-07-21 10:38:05   收藏:0   阅读:1679
String command = OpenOffice_HOME  
                  + "program\\soffice -headless -accept=\"socket,host=127.0.0.1,port=8100;urp;\" -nofirststartwizard "; 
         
          command = "cmd /c start "+command.replaceAll(" ","\" \"");
          Process pro = Runtime.getRuntime().exec(command);



Java Runtime.getRuntime().exec 执行带空格命令解决办法,布布扣,bubuko.com

原文:http://my.oschina.net/UpBoy/blog/292164

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!