Jetty
  1. Jetty
  2. JETTY-1492

Specifying -D option in start.ini puts slashes in file path on windows when starting

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:
      Eclipse Jetty distribution 8.1.1.v20120215, Windows XP SP3
    • Number of attachments :
      0

      Description

      Adding the following options in the start.ini:

      --exec
      -Djava.security.krb5.conf=C:\Program Files\Apache Software Foundation\Tomcat 5.5\krb5.conf
      -Djava.security.auth.login.config=C:\Program Files\Apache Software Foundation\Tomcat 5.5\cas_jaas.conf

      Causes the java jre to be spawned with the following command line args:

      "-Djava.security.auth.login.config=C:\Program\ Files\Apache\ Software\ Foundation\Tomcat\ 5.5\cas_jaas.conf"
      "-Djava.security.krb5.conf=C:\Program\ Files\Apache\ Software\ Foundation\Tomcat\ 5.5\krb5.conf"

      (notice the extra escaping slashes which probably work fine under unix, but messes up windows)

      JAAS fails to work with the options specified above.

      If I move the files to a folder without spaces and change the start.ini then it works fine, eg:
      -Djava.security.krb5.conf=C:\jaas\krb5.conf
      -Djava.security.auth.login.config=C:\jaas\cas_jaas.conf

        Activity

        Hide
        Joakim Erdfelt added a comment -

        out of curiosity, what happens if you use this syntax in the start.ini?

        -Djava.security.krb5.conf=C:/Program Files/Apache Software Foundation/Tomcat 5.5/krb5.conf
        -Djava.security.auth.login.config=C:/Program Files/Apache Software Foundation/Tomcat 5.5/cas_jaas.conf

        or you quote the start.ini sections?

        "-Djava.security.krb5.conf=C:\Program Files\Apache Software Foundation\Tomcat 5.5\krb5.conf"
        "-Djava.security.auth.login.config=C:\Program Files\Apache Software Foundation\Tomcat 5.5\cas_jaas.conf"

        Show
        Joakim Erdfelt added a comment - out of curiosity, what happens if you use this syntax in the start.ini? -Djava.security.krb5.conf=C:/Program Files/Apache Software Foundation/Tomcat 5.5/krb5.conf -Djava.security.auth.login.config=C:/Program Files/Apache Software Foundation/Tomcat 5.5/cas_jaas.conf or you quote the start.ini sections? "-Djava.security.krb5.conf=C:\Program Files\Apache Software Foundation\Tomcat 5.5\krb5.conf" "-Djava.security.auth.login.config=C:\Program Files\Apache Software Foundation\Tomcat 5.5\cas_jaas.conf"
        Hide
        Jamie Maher added a comment -

        Hi Joakim,

        Using the forward slash syntax:
        -Djava.security.krb5.conf=C:/Program Files/Apache Software Foundation/Tomcat 5.5/krb5.conf

        Results in this:
        "-Djava.security.auth.login.config=C:/Program\ Files/Apache\ Software\ Foundation/Tomcat\ 5.5/krb5.conf"

        If I quote the start.ini sections (they were not quoted before) then it excludes them in the spawned java jre command line.

        It's funny, because the -Djetty.home parameter in the spawned java jre contains spaces in the command line:
        (although it's not specified in the start.ini)

        "-Djetty.home=C:\Program Files\Jetty\jetty-distribution-8.1.1.v20120215"

        There must be some magic processing in the start.jar that is unix specific that's getting applied when it shouldn't..

        Show
        Jamie Maher added a comment - Hi Joakim, Using the forward slash syntax: -Djava.security.krb5.conf=C:/Program Files/Apache Software Foundation/Tomcat 5.5/krb5.conf Results in this: "-Djava.security.auth.login.config=C:/Program\ Files/Apache\ Software\ Foundation/Tomcat\ 5.5/krb5.conf" If I quote the start.ini sections (they were not quoted before) then it excludes them in the spawned java jre command line. It's funny, because the -Djetty.home parameter in the spawned java jre contains spaces in the command line: (although it's not specified in the start.ini) "-Djetty.home=C:\Program Files\Jetty\jetty-distribution-8.1.1.v20120215" There must be some magic processing in the start.jar that is unix specific that's getting applied when it shouldn't..
        Hide
        Joakim Erdfelt added a comment -

        Actually, it's not unix specific, its Runtime.exec() specific.
        The arguments for it must be properly quoted/escaped for it to work.

        Wish I could flag bugs on jira as 'valid' or 'confirmed'

        Show
        Joakim Erdfelt added a comment - Actually, it's not unix specific, its Runtime.exec() specific. The arguments for it must be properly quoted/escaped for it to work. Wish I could flag bugs on jira as 'valid' or 'confirmed'
        Hide
        Jamie Maher added a comment -

        Note: jdk1.6.0_17 was used to launch start.jar

        Show
        Jamie Maher added a comment - Note: jdk1.6.0_17 was used to launch start.jar
        Hide
        Jan Bartel added a comment -

        This issue was moved to jetty eclipse bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=396564

        Show
        Jan Bartel added a comment - This issue was moved to jetty eclipse bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=396564

          People

          • Assignee:
            Joakim Erdfelt
            Reporter:
            Jamie Maher
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: