Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-13864

JDK auto installer installs to a different path than JAVA_HOME for a build uses

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Blocker Blocker
    • core

      I have a Linux Jenkins server, and a Windows slave (I haven't tested yet to see if this is an issue with non-Windows slaves).

      In the settings page, I have configured Jenkins to auto install "Java SE Development Kit 7u3" from java.sun.com

      When I launch a build which uses Java, Jenkins downloads and install the JDK onto the slave, but then, when the build is run, JAVA_HOME is not set to the directory that the JDK was installed to.

      In the build output, here is what I see when the JDK is installed:
      Installing c:\jenkins\tools\JDK\Java_7\jdk.exe
      [Java_7] $ c:\jenkins\tools\JDK\Java_7\jdk.exe /s /v /qn /L \"c:\jenkins\tools\JDK\Java_7\jdk.exe.install.log\" REBOOT=ReallySuppress INSTALLDIR=\"c:\jenkins\tools\JDK\Java_7\"

      During the build, JAVA_HOME is set to "c:\jenkins\tools\JDK\Java_7\"

      However, the JDK is actually installed to "C:\jenkins\tools\Java_7"

      So it appears that the c:\jenkins\tools\JDK\Java_7\jdk.exe installer is installing to "C:\jenkins\tools\Java_7" but, according to its command line invocation's INSTALLDIR parameter, and to what Jenkins sets as JAVA_HOME, it should be installing to "c:\jenkins\tools\JDK\Java_7\"

      This problem starts with Jenkins version 1.464.

            Unassigned Unassigned
            candrews candrews
            Votes:
            9 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: