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

Add flag which allows starting Jenkins with unsupported Java versions

      Attempting to start Jenkins with 'java -jar jenkins.war' produces the following:

      Jenkins requires Java 8, but you are running 10.0.1+10 from /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
      java.lang.UnsupportedClassVersionError: 54.0
          at Main.main(Main.java:128)

      Reverting back to Jenkins 2.89.4 solves the problem of starting with Java 10.0.1. This exception is also thrown with Jenkins 2.119

          [JENKINS-51155] Add flag which allows starting Jenkins with unsupported Java versions

          Daniel Beck added a comment -

          There are plenty of known issues across Jenkins that prevent pretty much any use of it, and we haven't been able to address them since Java 9 went GA, so I don't see the point to make that a user option.It's not nearly a "we haven't gotten around to testing it, so we prevent it". We were simply tired of dozens and dozens of reports of people running Jenkins on Java 9 and reporting the same problems over and over.

          Daniel Beck added a comment - There are plenty of known issues across Jenkins that prevent pretty much any use of it, and we haven't been able to address them since Java 9 went GA, so I don't see the point to make that a user option.It's not nearly a "we haven't gotten around to testing it, so we prevent it". We were simply tired of dozens and dozens of reports of people running Jenkins on Java 9 and reporting the same problems over and over.

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/Main.java
          http://jenkins-ci.org/commit/extras-executable-war/a4bb984dc19cb47e0a003de40582cf149f5e7e7c
          Log:
          JENKINS-51155 - Add the --enable-future-java flag, which allows running with not-yet-supported Java versions

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/Main.java http://jenkins-ci.org/commit/extras-executable-war/a4bb984dc19cb47e0a003de40582cf149f5e7e7c Log: JENKINS-51155 - Add the --enable-future-java flag, which allows running with not-yet-supported Java versions

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/Main.java
          http://jenkins-ci.org/commit/extras-executable-war/8099ace9f2e8e9a87fea44b325e40f5bec3ca284
          Log:
          JENKINS-51155 - Address comments from @daniel-beck

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/Main.java http://jenkins-ci.org/commit/extras-executable-war/8099ace9f2e8e9a87fea44b325e40f5bec3ca284 Log: JENKINS-51155 - Address comments from @daniel-beck

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/Main.java
          http://jenkins-ci.org/commit/extras-executable-war/ef31ef2191170a17cb2504db98bac0b0a7e5ebd9
          Log:
          JENKINS-51155 - Do not declare exception when it’s not needed (CC @daniel-beck)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/Main.java http://jenkins-ci.org/commit/extras-executable-war/ef31ef2191170a17cb2504db98bac0b0a7e5ebd9 Log: JENKINS-51155 - Do not declare exception when it’s not needed (CC @daniel-beck)

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          src/main/java/Main.java
          http://jenkins-ci.org/commit/extras-executable-war/e92345e8e5d27bc5f40c33554b37e8528d6aabaf
          Log:
          Merge pull request #17 from oleg-nenashev/feature/JENKINS-51155

          JENKINS-51155 - Add the --enable-future-java flag, which allows running with not-yet-supported Java versions

          Compare: https://github.com/jenkinsci/extras-executable-war/compare/5ea87b145288...e92345e8e5d2
          *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

          Functionality will be removed from GitHub.com on January 31st, 2019.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/Main.java http://jenkins-ci.org/commit/extras-executable-war/e92345e8e5d27bc5f40c33554b37e8528d6aabaf Log: Merge pull request #17 from oleg-nenashev/feature/ JENKINS-51155 JENKINS-51155 - Add the --enable-future-java flag, which allows running with not-yet-supported Java versions Compare: https://github.com/jenkinsci/extras-executable-war/compare/5ea87b145288...e92345e8e5d2 * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          war/pom.xml
          http://jenkins-ci.org/commit/jenkins/3783cc40a4851d3d92df28f534590b850fe714b2
          Log:
          JENKINS-51155 - Update Extras Executable WAR to 1.40 to pick the —enable-future-java flag (#3486)

          • JENKINS-51155 - Update Extras Executable WAR to 1.40 to pick the —enable-future-java flag

          *NOTE:* This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

          Functionality will be removed from GitHub.com on January 31st, 2019.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: war/pom.xml http://jenkins-ci.org/commit/jenkins/3783cc40a4851d3d92df28f534590b850fe714b2 Log: JENKINS-51155 - Update Extras Executable WAR to 1.40 to pick the —enable-future-java flag (#3486) JENKINS-51155 - Update Extras Executable WAR to 1.40 to pick the —enable-future-java flag JENKINS-51155 - Pick newer snapshot JENKINS-51155 - Pick the released 1.40 version * NOTE: * This service been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ Functionality will be removed from GitHub.com on January 31st, 2019.

          Oleg Nenashev added a comment -

          Fix has been released in Extras Executable WAR 1.40 and Jenkins 2.127
          Maybe it worth backporting it to 2.121.x LTS taking the feedback.

          Currently Jenkins starts up well with the following options:

          ${JAVA10_HOME}/bin/java --add-modules java.xml.bind -jar jenkins.war --enable-future-java --httpPort=8080 --prefix=/jenkins
          

          We are tracking discovered issues in the EPIC of this ticket

          Oleg Nenashev added a comment - Fix has been released in Extras Executable WAR 1.40 and Jenkins 2.127 Maybe it worth backporting it to 2.121.x LTS taking the feedback. Currently Jenkins starts up well with the following options: ${JAVA10_HOME}/bin/java --add-modules java.xml.bind -jar jenkins.war --enable- future -java --httpPort=8080 --prefix=/jenkins We are tracking discovered issues in the EPIC of this ticket

          Daniel Beck added a comment -

          What exactly is the goal of backporting this? The use case above and the apparent justification given in the executable war PR don't seem to necessitate an LTS backport of a new feature.

          Daniel Beck added a comment - What exactly is the goal of backporting this? The use case above and the apparent justification given in the executable war PR don't seem to necessitate an LTS backport of a new feature.

          I suspect backporting this alone might actually be counterproductive. Any indication running on java 9+ is permitted will cause people to try it a see it broken providing upstream with feedback that will be quite outdated after the hackathon this week. I do not see a point in doing so until we actually start backporting some Java 9+ fixes. Thoughts?

          Oliver Gondža added a comment - I suspect backporting this alone might actually be counterproductive. Any indication running on java 9+ is permitted will cause people to try it a see it broken providing upstream with feedback that will be quite outdated after the hackathon this week. I do not see a point in doing so until we actually start backporting some Java 9+ fixes. Thoughts?

          Oleg Nenashev added a comment -

          For Java 10 and 11 you will actually get a good number of features working on LTS: https://jenkins.io/blog/2018/06/17/running-jenkins-with-java10-11/#current-state . Everything common excepting Pipeline from what we see so far.

          But yes, I agree that the backporting is not justified well. For those who want to try Java 10+ we have weekly releases

          Oleg Nenashev added a comment - For Java 10 and 11 you will actually get a good number of features working on LTS: https://jenkins.io/blog/2018/06/17/running-jenkins-with-java10-11/#current-state . Everything common excepting Pipeline from what we see so far. But yes, I agree that the backporting is not justified well. For those who want to try Java 10+ we have weekly releases

            oleg_nenashev Oleg Nenashev
            wbeebe William Beebe
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: