Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!news.dfncis.de!not-for-mail From: =?UTF-8?B?U3ZlbiBLw7ZobGVy?= Newsgroups: comp.lang.java.programmer Subject: Re: exec problem is JDK 1.7.0_21 Date: Wed, 24 Apr 2013 11:22:14 +0300 Lines: 19 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.dfncis.de a1nFXYUB9ZwkQf+/pzHA+gQkCI747IAUa+yshGL9Xt332u+EV8HhDCfx8o Cancel-Lock: sha1:V9UjON6P/SOO8/bzMuDD+s7FGPA= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130404 Thunderbird/17.0.5 In-Reply-To: Xref: csiph.com comp.lang.java.programmer:23617 On 04/24/2013 12:05 AM, Martin Gregorie wrote: > Actually, on Linux almost all the messing about with strings is done by > the shell that invokes the the command if the strings are enclosed in > double quotes. Use single quotes instead and the strings arrive at the > program ProcessBuilder is running with no modification at all. Here are > the results of using (1) double quoted strings and (2) single quoted > strings. I don't know what you mean. On Linux (or other UNIX-like operating systems), you specify the command line parameters as an array of strings when executing an external program. There is by definition no "messing about" with strings. Whatever syntax the shell uses to escape quotes and backslashes is irrelevant to ProcessBuilder, as it doesn't use the shell to start programs, but rather invokes some flavor of the exec function directly. Regards, Sven