Back off jdk 1.5.0_05

Discussion in 'Java' started by Roedy Green, Sep 20, 2005.

  1. Roedy Green

    Roedy Green Guest

    I have submitted a serious bug on JDK 1.5.0_05. The command line
    parser is hosed. Ant does not work. Anything with quotes or
    backslashes may stop working. I am retreating to 1.5.0_04.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Sep 20, 2005
    #1
    1. Advertising

  2. Roedy Green

    Ian Pilcher Guest

    Roedy Green wrote:
    > I have submitted a serious bug on JDK 1.5.0_05. The command line
    > parser is hosed. Ant does not work. Anything with quotes or
    > backslashes may stop working. I am retreating to 1.5.0_04.


    Bug #?

    --
    ========================================================================
    Ian Pilcher
    ========================================================================
     
    Ian Pilcher, Sep 20, 2005
    #2
    1. Advertising

  3. Roedy Green

    Roedy Green Guest

    On Tue, 20 Sep 2005 20:26:37 GMT, Roedy Green
    <> wrote or quoted :

    >I have submitted a serious bug on JDK 1.5.0_05. The command line
    >parser is hosed. Ant does not work. Anything with quotes or
    >backslashes may stop working. I am retreating to 1.5.0_04.


    It turns out the "bug" is a feature that has been in there a while. I
    am surprised I have not tripped over it before. Perhaps I have and
    never noticed what was hitting me.

    details at http://mindprod.com/jgloss/main.html

    Will be posted in an hour or so.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Sep 21, 2005
    #3
  4. Roedy Green

    Roedy Green Guest

    On Tue, 20 Sep 2005 15:32:39 -0500, Ian Pilcher
    <> wrote or quoted :

    >Bug #?


    It has only an internal review ID of 538733 at this point. It won't
    get one. I now think it is a "feature" - an ugly feature.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Sep 21, 2005
    #4
  5. I tried this on my Win XP with Java 1.5.0_04:

    public class Test
    {
    public static void main(String[] args)
    {
    for (int i = 0; i < args.length; i++)
    System.out.println("args[" + i + "] = " + args);
    }
    }

    This is the output from the command-line execution:

    > java Test " \\Program Files "

    args[0] = \\Program Files

    (ignore the space between double quote and backslash; my OE client takes
    liberty of reformatting text when " is followed by \\. The actual command
    does not use spaces.)

    > java Test "\Program Files"

    args[0] = \Program Files

    This syntax also works when the JVM is started programmatically by
    Runtime.exec() method.

    What happens with this test at your end?

    Alex Molochnikov
    Gestalt Corporation


    "Roedy Green" <> wrote in message
    news:...
    > On Tue, 20 Sep 2005 20:26:37 GMT, Roedy Green
    > <> wrote or quoted :
    >
    > >I have submitted a serious bug on JDK 1.5.0_05. The command line
    > >parser is hosed. Ant does not work. Anything with quotes or
    > >backslashes may stop working. I am retreating to 1.5.0_04.

    >
    > It turns out the "bug" is a feature that has been in there a while. I
    > am surprised I have not tripped over it before. Perhaps I have and
    > never noticed what was hitting me.
    >
    > details at http://mindprod.com/jgloss/main.html
    >
    > Will be posted in an hour or so.
    > --
    > Canadian Mind Products, Roedy Green.
    > http://mindprod.com Again taking new Java programming contracts.
     
    Alex Molochnikov, Sep 21, 2005
    #5
  6. Roedy Green

    Roedy Green Guest

    Roedy Green, Sep 21, 2005
    #6
  7. I misread the page the first time.

    I tried running java as a second-hand process through Runtime.exec(),
    passing parameters with backslashes to it, and observed the same effect
    (stripping off the tail-end backslashes, so that two become one, and one
    becomes none).

    For a moment I thought it was a DOS command-line interpretor (cmd) playing
    tricks, but it is obviously Java.

    Stranger things happened.


    "Roedy Green" <> wrote in message
    news:...
    > On Wed, 21 Sep 2005 02:03:37 GMT, "Alex Molochnikov"
    > <> wrote or quoted :
    >
    > >What happens with this test at your end?

    >
    > I posted a number of examples at
    > http://mindprod.com/jgloss/main.html#COMMANDLINE
    > --
    > Canadian Mind Products, Roedy Green.
    > http://mindprod.com Again taking new Java programming contracts.
     
    Alex Molochnikov, Sep 21, 2005
    #7
  8. Roedy Green

    Roedy Green Guest

    On Wed, 21 Sep 2005 02:55:42 GMT, "Alex Molochnikov"
    <> wrote or quoted :

    >For a moment I thought it was a DOS command-line interpretor (cmd) playing
    >tricks, but it is obviously Java.


    If you write a DOS program, you get the entire command line in one
    great piece. It is up to you to split it into parms.

    I assumed that Windows works the the same way, and the application
    uses library code to split into bite size parameters. The quotes and
    \ stuff has to be done by whatever does that splitting, e.g. the C
    runtime or the Java runtime.

    I suppose this convention works fine under other oses. It is just
    windows where trailing \ are common.

    The wanted to make it work the same way on all platforms.

    I have always preferred the exec where you use a String[]. It just
    seemed more "reliable". Perhaps it somehow helps you avoid this
    command line glitch.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Sep 21, 2005
    #8
  9. Andrea Desole, Sep 21, 2005
    #9
  10. "Roedy Green" <> wrote in message
    news:...
    > If you write a DOS program, you get the entire command line in one
    > great piece. It is up to you to split it into parms.
    >
    > I assumed that Windows works the the same way, and the application
    > uses library code to split into bite size parameters. The quotes and
    > \ stuff has to be done by whatever does that splitting, e.g. the C
    > runtime or the Java runtime.
    >
    > I suppose this convention works fine under other oses. It is just
    > windows where trailing \ are common.
    >
    > The wanted to make it work the same way on all platforms.
    >
    > I have always preferred the exec where you use a String[]. It just
    > seemed more "reliable". Perhaps it somehow helps you avoid this
    > command line glitch.


    For UNIX/Linux, where multiple command line arguments
    are supported at the OS level, this is entirely reliable. For
    Windows, it is somewhat more reliable, but there is no
    guarantee that the target program will parse command line
    arguments the way that Java assumes it will. When I first
    learned that Windows only supported one command line
    argument, I was appalled.
     
    Larry Barowski, Sep 21, 2005
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian Pilcher

    Changelog for 1.5.0_05?

    Ian Pilcher, Sep 19, 2005, in forum: Java
    Replies:
    4
    Views:
    337
    Ian Pilcher
    Sep 20, 2005
  2. Replies:
    5
    Views:
    2,027
    Gordon Beaton
    Dec 28, 2005
  3. Guapo
    Replies:
    7
    Views:
    2,159
    Jon Martin Solaas
    Mar 13, 2006
  4. Mark Space
    Replies:
    0
    Views:
    474
    Mark Space
    Apr 14, 2008
  5. Roedy Green

    JDK 1.7.0_05 is out

    Roedy Green, Jun 13, 2012, in forum: Java
    Replies:
    1
    Views:
    761
    Roedy Green
    Jun 13, 2012
Loading...

Share This Page