Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #23473 > unrolled thread
| Started by | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| First post | 2013-04-16 15:48 -0700 |
| Last post | 2013-04-27 22:31 -0400 |
| Articles | 6 on this page of 86 — 16 participants |
Back to article view | Back to comp.lang.java.programmer
exec problem is JDK 1.7.0_21 Roedy Green <see_website@mindprod.com.invalid> - 2013-04-16 15:48 -0700
Re: exec problem is JDK 1.7.0_21 Lew <lewbloch@gmail.com> - 2013-04-16 16:48 -0700
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-20 13:00 +0300
Re: exec problem is JDK 1.7.0_21 Joerg Meier <joergmmeier@arcor.de> - 2013-04-20 15:13 +0200
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-20 19:07 +0300
Re: exec problem is JDK 1.7.0_21 markspace <markspace@nospam.nospam> - 2013-04-20 09:24 -0700
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-20 19:34 +0300
Re: exec problem is JDK 1.7.0_21 markspace <markspace@nospam.nospam> - 2013-04-20 11:01 -0700
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-21 00:25 +0300
Re: exec problem is JDK 1.7.0_21 Joerg Meier <joergmmeier@arcor.de> - 2013-04-20 22:03 +0200
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-21 00:29 +0300
Re: exec problem is JDK 1.7.0_21 Martin Gregorie <martin@address-in-sig.invalid> - 2013-04-20 21:56 +0000
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-21 08:31 +0300
Re: exec problem is JDK 1.7.0_21 Martin Gregorie <martin@address-in-sig.invalid> - 2013-04-21 11:08 +0000
Re: exec problem is JDK 1.7.0_21 Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-04-21 13:43 -0300
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-21 23:12 +0300
Re: exec problem is JDK 1.7.0_21 Martin Gregorie <martin@address-in-sig.invalid> - 2013-04-21 21:17 +0000
Re: exec problem is JDK 1.7.0_21 Arne Vajhøj <arne@vajhoej.dk> - 2013-04-27 22:49 -0400
Re: exec problem is JDK 1.7.0_21 Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-04-20 15:03 -0700
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-21 08:26 +0300
Re: exec problem is JDK 1.7.0_21 "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-04-21 14:30 +0100
Re: exec problem is JDK 1.7.0_21 Knute Johnson <nospam@knutejohnson.com> - 2013-04-21 09:20 -0700
Re: exec problem is JDK 1.7.0_21 markspace <markspace@nospam.nospam> - 2013-04-21 11:31 -0700
Re: exec problem is JDK 1.7.0_21 Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-04-21 16:06 -0300
Re: exec problem is JDK 1.7.0_21 Martin Gregorie <martin@address-in-sig.invalid> - 2013-04-21 19:47 +0000
Re: exec problem is JDK 1.7.0_21 Martin Gregorie <martin@address-in-sig.invalid> - 2013-04-21 23:01 +0000
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-21 23:29 +0300
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-21 23:45 +0300
Re: exec problem is JDK 1.7.0_21 Martin Gregorie <martin@address-in-sig.invalid> - 2013-04-21 21:38 +0000
Re: exec problem is JDK 1.7.0_21 Knute Johnson <nospam@knutejohnson.com> - 2013-04-21 18:49 -0700
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-22 09:36 +0300
Re: exec problem is JDK 1.7.0_21 Steven Simpson <ss@domain.invalid> - 2013-04-22 10:39 +0100
Re: exec problem is JDK 1.7.0_21 Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-04-22 07:43 -0700
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-22 19:33 +0300
Re: exec problem is JDK 1.7.0_21 Steven Simpson <ss@domain.invalid> - 2013-04-23 07:30 +0100
Re: exec problem is JDK 1.7.0_21 Martin Gregorie <martin@address-in-sig.invalid> - 2013-04-22 21:07 +0000
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-23 23:28 +0300
Re: exec problem is JDK 1.7.0_21 Martin Gregorie <martin@address-in-sig.invalid> - 2013-04-23 21:05 +0000
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-24 11:22 +0300
Re: exec problem is JDK 1.7.0_21 Martin Gregorie <martin@address-in-sig.invalid> - 2013-04-24 20:22 +0000
Re: exec problem is JDK 1.7.0_21 Nigel Wade <nmw@ion.le.ac.uk> - 2013-04-24 11:24 +0100
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-21 23:23 +0300
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-21 00:40 +0300
Re: exec problem is JDK 1.7.0_21 Steven Simpson <ss@domain.invalid> - 2013-04-23 10:48 +0100
Re: exec problem is JDK 1.7.0_21 Donkey Hottie <donkey@fredriksson.dy.fi> - 2013-04-23 13:31 +0300
<? extends String> (was: exec problem is JDK 1.7.0_21) Steven Simpson <ss@domain.invalid> - 2013-04-23 14:55 +0100
Re: <? extends String> lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-04-23 16:37 +0100
Re: <? extends String> Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-04-23 08:50 -0700
Re: <? extends String> lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-04-23 17:30 +0100
Re: <? extends String> Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-04-23 09:58 -0700
Re: <? extends String> Donkey Hottie <donkey@fredriksson.dy.fi> - 2013-04-23 21:06 +0300
Re: <? extends String> lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-04-23 19:33 +0100
Re: <? extends String> Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-04-23 12:26 -0700
Re: <? extends String> lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-04-24 09:08 +0100
Re: <? extends String> Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-04-23 16:28 -0300
Re: <? extends String> (was: exec problem is JDK 1.7.0_21) Lew <lewbloch@gmail.com> - 2013-04-23 14:12 -0700
Re: <? extends String> Steven Simpson <ss@domain.invalid> - 2013-04-23 23:22 +0100
Re: exec problem is JDK 1.7.0_21 Steven Simpson <ss@domain.invalid> - 2013-04-23 19:56 +0100
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-23 23:31 +0300
Re: exec problem is JDK 1.7.0_21 Steven Simpson <ss@domain.invalid> - 2013-04-23 23:39 +0100
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-24 09:29 +0300
Re: exec problem is JDK 1.7.0_21 Steven Simpson <ss@domain.invalid> - 2013-04-24 10:26 +0100
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-24 13:11 +0300
Re: exec problem is JDK 1.7.0_21 Steven Simpson <ss@domain.invalid> - 2013-04-24 22:24 +0100
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-25 11:49 +0300
Re: exec problem is JDK 1.7.0_21 Steven Simpson <ss@domain.invalid> - 2013-04-25 10:19 +0100
Re: exec problem is JDK 1.7.0_21 "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-04-25 09:02 +0100
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-25 11:47 +0300
Re: exec problem is JDK 1.7.0_21 Steven Simpson <ss@domain.invalid> - 2013-04-25 09:50 +0100
Re: exec problem is JDK 1.7.0_21 Steven Simpson <ss@domain.invalid> - 2013-04-25 10:07 +0100
Re: exec problem is JDK 1.7.0_21 "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-04-27 08:44 +0100
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-26 20:17 +0300
Re: exec problem is JDK 1.7.0_21 Steven Simpson <ss@domain.invalid> - 2013-04-27 09:22 +0100
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-27 12:39 +0300
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-23 23:17 +0300
Re: exec problem is JDK 1.7.0_21 Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-04-23 17:32 -0300
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-24 10:39 +0300
Re: exec problem is JDK 1.7.0_21 "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-04-25 09:02 +0100
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-25 11:59 +0300
Re: exec problem is JDK 1.7.0_21 Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-04-25 18:38 -0300
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-28 10:57 +0300
Re: exec problem is JDK 1.7.0_21 Arne Vajhøj <arne@vajhoej.dk> - 2013-04-27 22:35 -0400
Re: exec problem is JDK 1.7.0_21 Sven Köhler <remove-sven.koehler@gmail.com> - 2013-04-28 09:23 +0300
Re: exec problem is JDK 1.7.0_21 Arne Vajhøj <arne@vajhoej.dk> - 2013-04-28 09:52 -0400
Re: exec problem is JDK 1.7.0_21 Stanimir Stamenkov <s7an10@netscape.net> - 2013-04-20 17:52 +0300
Re: exec problem is JDK 1.7.0_21 Arne Vajhøj <arne@vajhoej.dk> - 2013-04-27 22:31 -0400
Page 5 of 5 — ← Prev page 1 2 3 4 [5]
| From | Sven Köhler <remove-sven.koehler@gmail.com> |
|---|---|
| Date | 2013-04-28 10:57 +0300 |
| Message-ID | <au433kFahsaU1@mid.dfncis.de> |
| In reply to | #23650 |
On 04/26/2013 12:38 AM, Arved Sandstrom wrote: > My comment just meant what it said - identify the specific app on > Windows, the arguments it needs, and do what you need to do with > ProcessBuilder - in a way irrespective of official docs - to make it work. OK, I've done that. In my case, it is possible to workaround the buggy ProcessBuilder escaping - luckily. Now, in other cases it's actually impossible, as ProcessBuilder will add quotes where they don't belong. For the sake of argument, let's assume my case would be of the latter type: I can't workaround ProcessBuilder's mangling of Strings. What do I do now? And why does this matter for the question, whether ProcessBuilder is broken or not? Regards, Sven
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2013-04-27 22:35 -0400 |
| Message-ID | <517c8b03$0$32105$14726298@news.sunsite.dk> |
| In reply to | #23613 |
On 4/24/2013 3:39 AM, Sven Köhler wrote: > On 04/23/2013 11:32 PM, Arved Sandstrom wrote: >> That's the point a number of us have been making, Sven. In the case of >> ProcessBuilder and Process you jump to no conclusions, and test your >> specific case. > > The specific case is broken. Now what? ProcessBuilder provides some functionality. If you need more or different functionality, then use JNI to write your own stuff. Running external processes is not really platform independent, so you do not loose that. Arne
[toc] | [prev] | [next] | [standalone]
| From | Sven Köhler <remove-sven.koehler@gmail.com> |
|---|---|
| Date | 2013-04-28 09:23 +0300 |
| Message-ID | <au3tj8F9ehgU1@mid.dfncis.de> |
| In reply to | #23684 |
Am 28.04.2013 05:35, schrieb Arne Vajhøj: > On 4/24/2013 3:39 AM, Sven Köhler wrote: >> On 04/23/2013 11:32 PM, Arved Sandstrom wrote: >>> That's the point a number of us have been making, Sven. In the case of >>> ProcessBuilder and Process you jump to no conclusions, and test your >>> specific case. >> >> The specific case is broken. Now what? > > ProcessBuilder provides some functionality. Hmm. I find that argument dangerous, as it given the a free pass to implement whatever they want - however badly they want ... > If you need more or different functionality, then use JNI > to write your own stuff. ... and then claim > Running external processes is not really platform independent, > so you do not loose that. Are you saying, that they should have never attempted to convert an array of arguments into a command line string on Windows? Because that would exactly be one of my points. Recall the fact, that documentation already mentions the possibility of proper platform dependent behaviour. Or are you somehow trying to defend the faulty escaping they implemented to make it seem like a cross-platform API? Because at the moment, we're stuck with something broken which is neither platform dependent nor independent. We neither have a platform dependent API (e.g. taking arrays of arguments on UNIX and a single argument on Windows) and neither a platform independent API (which properly converts an argument array to an argument string). Regards, Sven
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2013-04-28 09:52 -0400 |
| Message-ID | <517d298c$0$32112$14726298@news.sunsite.dk> |
| In reply to | #23687 |
On 4/28/2013 2:23 AM, Sven Köhler wrote: > Am 28.04.2013 05:35, schrieb Arne Vajhøj: >> On 4/24/2013 3:39 AM, Sven Köhler wrote: >>> On 04/23/2013 11:32 PM, Arved Sandstrom wrote: >>>> That's the point a number of us have been making, Sven. In the case of >>>> ProcessBuilder and Process you jump to no conclusions, and test your >>>> specific case. >>> >>> The specific case is broken. Now what? >> >> ProcessBuilder provides some functionality. > > Hmm. I find that argument dangerous, as it given the a free pass to > implement whatever they want - however badly they want ... I don't think they have intended to do it badly. They decided to do things a certain way. And that decision is causing some problem for you. But that does not necesarrily make it a bad decision. >> If you need more or different functionality, then use JNI >> to write your own stuff. > > ... and then claim > >> Running external processes is not really platform independent, >> so you do not loose that. > > Are you saying, that they should have never attempted to convert an > array of arguments into a command line string on Windows? Because that > would exactly be one of my points. Recall the fact, that documentation > already mentions the possibility of proper platform dependent behaviour. > Or are you somehow trying to defend the faulty escaping they implemented > to make it seem like a cross-platform API? > > Because at the moment, we're stuck with something broken which is > neither platform dependent nor independent. We neither have a platform > dependent API (e.g. taking arrays of arguments on UNIX and a single > argument on Windows) and neither a platform independent API (which > properly converts an argument array to an argument string). I am saying that executing external commands is not platform independent and that if you don't like the standard functionality, then you should just create your own native code and call it via JNI. Problem solved. Arne
[toc] | [prev] | [next] | [standalone]
| From | Stanimir Stamenkov <s7an10@netscape.net> |
|---|---|
| Date | 2013-04-20 17:52 +0300 |
| Message-ID | <kku9tr$83g$1@dont-email.me> |
| In reply to | #23473 |
Tue, 16 Apr 2013 15:48:10 -0700, /Roedy Green/:
> This code no longer works in JDK 1.7.0_21
>
> Process p = exec( "F:\\Program Files (x86)\\netload\\netload.exe",
> true/* wait */ );
>
> I thought perhaps it wanted some embedded quotes, but that does not
> work either.
>
> Will experiment further.
>
> Command works fine at the prompt.
You may also read in the release notes - "Changes to Runtime.exec"
<http://www.oracle.com/technetwork/java/javase/7u21-relnotes-1932873.html#jruntime>:
> On Windows platform, the decoding of command strings specified to
> Runtime.exec(String), Runtime.exec(String,String[]) and
> Runtime.exec(String,String[],File) methods, has been improved to
> follow the specification more closely. This may cause problems for
> applications that are using one or more of these methods with
> commands that contain spaces in the program name, or are invoking
> these methods with commands that are not quoted correctly.
>
> For example, Runtime.getRuntime().exec("C:\\My Programs\\foo.exe
> bar") is an attempt to launch the program "C:\\My" with the
> arguments "Programs\\foo.exe" and "bar". This command is likely to
> fail with an exception to indicate "C:\My" cannot be found.
> [...]
--
Stanimir
[toc] | [prev] | [next] | [standalone]
| From | Arne Vajhøj <arne@vajhoej.dk> |
|---|---|
| Date | 2013-04-27 22:31 -0400 |
| Message-ID | <517c8a07$0$32105$14726298@news.sunsite.dk> |
| In reply to | #23524 |
On 4/20/2013 10:52 AM, Stanimir Stamenkov wrote:
> Tue, 16 Apr 2013 15:48:10 -0700, /Roedy Green/:
>
>> This code no longer works in JDK 1.7.0_21
>>
>> Process p = exec( "F:\\Program Files (x86)\\netload\\netload.exe",
>> true/* wait */ );
>>
>> I thought perhaps it wanted some embedded quotes, but that does not
>> work either.
>>
>> Will experiment further.
>>
>> Command works fine at the prompt.
>
> You may also read in the release notes - "Changes to Runtime.exec"
> <http://www.oracle.com/technetwork/java/javase/7u21-relnotes-1932873.html#jruntime>:
>
>> On Windows platform, the decoding of command strings specified to
>> Runtime.exec(String), Runtime.exec(String,String[]) and
>> Runtime.exec(String,String[],File) methods, has been improved to
>> follow the specification more closely. This may cause problems for
>> applications that are using one or more of these methods with
>> commands that contain spaces in the program name, or are invoking
>> these methods with commands that are not quoted correctly.
>>
>> For example, Runtime.getRuntime().exec("C:\\My Programs\\foo.exe
>> bar") is an attempt to launch the program "C:\\My" with the
>> arguments "Programs\\foo.exe" and "bar". This command is likely to
>> fail with an exception to indicate "C:\My" cannot be found.
>> [...]
Sometimes it is a good thing to read the release notes.
Arne
[toc] | [prev] | [standalone]
Page 5 of 5 — ← Prev page 1 2 3 4 [5]
Back to top | Article view | comp.lang.java.programmer
csiph-web