title: Why does Jenkins' start script fail under Java 11 (Ubuntu)?
body: <p>Trying to move from Java 8 to 11, but Jenkins doesn't run under 11. The weekly experimental builds say they will work with java 10, so I thought, I'll help them test this.</p>
  
  <p>So I upgrade to jenkins_2.151_all.deb (on my ubuntu box), but now I keep getting this error message:</p>
  
  <pre><code>thomas@testbox:~$ systemctl status jenkins.service
  ● jenkins.service - LSB: Start Jenkins at boot time
     Loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2018-11-15 14:12:46 UTC; 6s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 8127 ExecStart=/etc/init.d/jenkins start (code=exited, status=1/FAILU
  
  Nov 15 14:12:46 testbox jenkins[8127]: Found an incorrect Java version
  Nov 15 14:12:46 testbox jenkins[8127]: Java version found:
  Nov 15 14:12:46 testbox jenkins[8127]: java version "11" 2018-09-25
  Nov 15 14:12:46 testbox jenkins[8127]: Java(TM) SE Runtime Environment 18.9 (bui
  Nov 15 14:12:46 testbox jenkins[8127]: Java HotSpot(TM) 64-Bit Server VM 18.9 (b
  Nov 15 14:12:46 testbox jenkins[8127]: Aborting
  Nov 15 14:12:46 testbox systemd[1]: jenkins.service: Control process exited, cod
  Nov 15 14:12:46 testbox systemd[1]: Failed to start LSB: Start Jenkins at boot t
  Nov 15 14:12:46 testbox systemd[1]: jenkins.service: Unit entered failed state.
  Nov 15 14:12:46 testbox systemd[1]: jenkins.service: Failed with result 'exit-co
  </code></pre>
  
  <p>So I follow the directions here: <a href="https://stackoverflow.com/questions/39621263/jenkins-fails-when-running-service-start-jenkins">Jenkins fails when running &quot;service start jenkins&quot;</a> on the highest ranked answer  to run against my java 11 and I keep getting the same error.</p>
  
  <p>So then I think, screw it. I'm going to run jenkins under my java8 instance. So I change the path inserted above to run against /opt/java8 which is where my java is installed. I get:</p>
  
  <pre><code>thomas@testbox:/opt$ systemctl status -l jenkins.service
  ● jenkins.service - LSB: Start Jenkins at boot time
     Loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2018-11-15 14:15:50 UTC; 1min 3s
       Docs: man:systemd-sysv-generator(8)
    Process: 8237 ExecStart=/etc/init.d/jenkins start (code=exited, status=1/FAILU
  
  Nov 15 14:15:50 testbox jenkins[8237]: Found an incorrect Java version
  Nov 15 14:15:50 testbox jenkins[8237]: Java version found:
  Nov 15 14:15:50 testbox jenkins[8237]: java version "1.8.0_101"
  Nov 15 14:15:50 testbox jenkins[8237]: Java(TM) SE Runtime Environment (build 1.
  Nov 15 14:15:50 testbox jenkins[8237]: Java HotSpot(TM) 64-Bit Server VM (build 
  Nov 15 14:15:50 testbox jenkins[8237]: Aborting
  Nov 15 14:15:50 testbox systemd[1]: jenkins.service: Control process exited, cod
  Nov 15 14:15:50 testbox systemd[1]: Failed to start LSB: Start Jenkins at boot t
  Nov 15 14:15:50 testbox systemd[1]: jenkins.service: Unit entered failed state.
  Nov 15 14:15:50 testbox systemd[1]: jenkins.service: Failed with result 'exit-co
  </code></pre>
  
  <p>So now it's complaining even about java 8.</p>
  
  <p>Not sure what to try next</p>