Quoting Issue with JDK Installer with Windows Slave

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      When installing a new JDK on a windows slave, there appears to be a quoting issue with the arguments passed to the installer. From the console output:

      [jdk-1.6.0_17] $ C:\hudson-tmp\tools\jdk-1.6.0_17\jdk.exe /s '/v/qn REBOOT=Suppress INSTALLDIR=\"C:\hudson-tmp\tools\jdk-1.6.0_17\" /L \"C:\hudson-tmp\tools\jdk-1.6.0_17\jdk.exe.install.log\"'

      Notice how the /s is outside of the single quotes where the rest of the options are (/v/qn ...). Comments in the WINDOWS case of JDKInstaller.java#install seem to indicate that the options to the installer should be passed as one string. However, the code adds two strings - one for /s and another for the rest of the options.

      The result is that the jdk fails to install. However, executing C:\hudson-tmp\tools\jdk-1.6.0_17\jdk.exe /s /v/qn REBOOT=Suppress INSTALLDIR=\"C:\hudson-tmp\tools\jdk-1.6.0_17\" /L \"C:\hudson-tmp\tools\jdk-1.6.0_17\jdk.exe.install.log\" on a command prompt successfully installs the JDK.

            Assignee:
            Unassigned
            Reporter:
            calculu5
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: