添加不带双引号的单个字符串。
commands.add ( "C:\Program Files\CCBU\CCBU.exe"); commands.add ( "-d"); commands.add ("C:\My Data\projects\ccbu\ciccb-report.xls" ); commands.add ( "-tf"); commands.add("C:\Program Files\CCBU\loss-billing-filters.txt" ); commandExecutor = new SystemCommandExecutor(commands);
ProcessBuilder将处理必要的args处理。
拉起评论:
Jayan,您的主意让我开始思考:以下方法有效:
commands.add ( "-dC:\My Data\projects\ccbu\ciccb-report.xls" ); commands.add ( "-tfC:\Program Files\CCBU\loss-billing-filters.txt"); –林肯
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)