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

JDK installation influences already installed java instances, reinstall of Java had to be done to get back up and running

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • core
    • 1.398

      We have migrated from Hudson to Jenkins. We decided to create a new buildmaster, since we also faced some issue with the old master.
      On the new master we defined only 1 JDK.
      All builds try to install the new JDK (1.6.23) and on a number of systems (windows) this gave an issue.

      The JDK gets installed in ../tools/1.6.23, but the public JRE get installed in C:\Program Files\Java\jre6
      That influences already installed Java installation(s).
      On a number of machine we had to remove all Java installation and do a manual installation again to get it back up and running.

      For windows the public JRE has to be skipped I think.
      That can be done with the following command: ADDLOCAL="ToolsFeature,DemosFeature,SourceFeature"
      Or the install directory of the public JRE has to be defined as well: /INSTALLDIRPUBJRE=...
      That is not done right now.

      More info: http://www.oracle.com/technetwork/java/javase/install-windows-189425.html

      This issue is very frustrating and causing a lot of issue and loss of time.

          [JENKINS-8957] JDK installation influences already installed java instances, reinstall of Java had to be done to get back up and running

          Cees Bos added a comment -

          Once you download and install a JDK from Sun/Oracle it does install the JDK and it installs a jre folder inside the JDK directory AND it installs a public JRE. By default that is C:\Program Files\Java\jre6. This only occurs on windows, on linux only the JDK is installed.
          When you do a manual install it will ask you if you want to install public JRE and you can choose the installation directory.

          These 2 options are also available for silent installation: /INSTALLDIRPUBJRE= or the location and ADDLOCAL="ToolsFeature,DemosFeature,SourceFeature" to skip the public JRE at all.

          Cees Bos added a comment - Once you download and install a JDK from Sun/Oracle it does install the JDK and it installs a jre folder inside the JDK directory AND it installs a public JRE. By default that is C:\Program Files\Java\jre6. This only occurs on windows, on linux only the JDK is installed. When you do a manual install it will ask you if you want to install public JRE and you can choose the installation directory. These 2 options are also available for silent installation: /INSTALLDIRPUBJRE= or the location and ADDLOCAL="ToolsFeature,DemosFeature,SourceFeature" to skip the public JRE at all.

          Cees Bos added a comment -

          Any update on this ticket? We still face issues with automatic JDK installations on windows.

          • Either skip installation of public JRE
          • Or install public JRE in Jenkins/tools folder as well.

          Cees Bos added a comment - Any update on this ticket? We still face issues with automatic JDK installations on windows. Either skip installation of public JRE Or install public JRE in Jenkins/tools folder as well.

          Garen Parham added a comment -

          Fixing this one issue would solve hordes of others (or fix a sub-problem of many issues already filed).

          Garen Parham added a comment - Fixing this one issue would solve hordes of others (or fix a sub-problem of many issues already filed).

          cowwoc added a comment -

          I don't think you want to install the public JRE at all. The point is for Jenkins to use a self-contained installation which according to http://docs.oracle.com/javase/7/docs/webnotes/install/windows/jdk-installation-windows.html#private is a "private JRE".

          cowwoc added a comment - I don't think you want to install the public JRE at all. The point is for Jenkins to use a self-contained installation which according to http://docs.oracle.com/javase/7/docs/webnotes/install/windows/jdk-installation-windows.html#private is a "private JRE".

          cowwoc added a comment - - edited

          I posted a pull request which fixes this bug: https://github.com/jenkinsci/jenkins/pull/946

          Please review and integrate it.

          cowwoc added a comment - - edited I posted a pull request which fixes this bug: https://github.com/jenkinsci/jenkins/pull/946 Please review and integrate it.

          Code changed in jenkins
          User: Gili Tzabari
          Path:
          core/src/main/java/hudson/tools/JDKInstaller.java
          http://jenkins-ci.org/commit/jenkins/4f6e649294e27feb3afc870d0ca959e771ff9778
          Log:
          JENKINS-8957 JDK installation influences already installed java instances

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gili Tzabari Path: core/src/main/java/hudson/tools/JDKInstaller.java http://jenkins-ci.org/commit/jenkins/4f6e649294e27feb3afc870d0ca959e771ff9778 Log: JENKINS-8957 JDK installation influences already installed java instances

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/src/main/java/hudson/tools/JDKInstaller.java
          http://jenkins-ci.org/commit/jenkins/9ec37cc08aeba58c589d27c320f2e60a2f5eaec5
          Log:
          Merge branch 'JENKINS-8957' of https://github.com/cowwoc/jenkins into cowwoc-JENKINS-8957

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/src/main/java/hudson/tools/JDKInstaller.java http://jenkins-ci.org/commit/jenkins/9ec37cc08aeba58c589d27c320f2e60a2f5eaec5 Log: Merge branch ' JENKINS-8957 ' of https://github.com/cowwoc/jenkins into cowwoc- JENKINS-8957

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/6c886e7b028bbbe35470ada7201be88fbc78afc4
          Log:
          [FIXED JENKINS-19447] [FIXED JENKINS-8957] Noting changes in pull #946.

          Compare: https://github.com/jenkinsci/jenkins/compare/ea85489a0a8e...6c886e7b028b

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html http://jenkins-ci.org/commit/jenkins/6c886e7b028bbbe35470ada7201be88fbc78afc4 Log: [FIXED JENKINS-19447] [FIXED JENKINS-8957] Noting changes in pull #946. Compare: https://github.com/jenkinsci/jenkins/compare/ea85489a0a8e...6c886e7b028b

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2914
          JENKINS-8957 JDK installation influences already installed java instances (Revision 4f6e649294e27feb3afc870d0ca959e771ff9778)
          [FIXED JENKINS-19447] [FIXED JENKINS-8957] Noting changes in pull #946. (Revision 6c886e7b028bbbe35470ada7201be88fbc78afc4)

          Result = SUCCESS
          cowwoc : 4f6e649294e27feb3afc870d0ca959e771ff9778
          Files :

          • core/src/main/java/hudson/tools/JDKInstaller.java

          Jesse Glick : 6c886e7b028bbbe35470ada7201be88fbc78afc4
          Files :

          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #2914 JENKINS-8957 JDK installation influences already installed java instances (Revision 4f6e649294e27feb3afc870d0ca959e771ff9778) [FIXED JENKINS-19447] [FIXED JENKINS-8957] Noting changes in pull #946. (Revision 6c886e7b028bbbe35470ada7201be88fbc78afc4) Result = SUCCESS cowwoc : 4f6e649294e27feb3afc870d0ca959e771ff9778 Files : core/src/main/java/hudson/tools/JDKInstaller.java Jesse Glick : 6c886e7b028bbbe35470ada7201be88fbc78afc4 Files : changelog.html

          Code changed in jenkins
          User: Gili Tzabari
          Path:
          core/src/main/java/hudson/tools/JDKInstaller.java
          http://jenkins-ci.org/commit/jenkins/bcb098bee2d88a3364dcb624e25df1fdbcbbc139
          Log:
          JENKINS-8957 JDK installation influences already installed java instances

          (cherry picked from commit 4f6e649294e27feb3afc870d0ca959e771ff9778)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gili Tzabari Path: core/src/main/java/hudson/tools/JDKInstaller.java http://jenkins-ci.org/commit/jenkins/bcb098bee2d88a3364dcb624e25df1fdbcbbc139 Log: JENKINS-8957 JDK installation influences already installed java instances (cherry picked from commit 4f6e649294e27feb3afc870d0ca959e771ff9778)

            Unassigned Unassigned
            cbos Cees Bos
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: