javajenkinspathconfiguration

How to determine what Java Jenkins is using to run and point it to the correct location (Java 11)


I've looked all over for this answer but cannot find it, as most of the answers are how to add JDK to Jenkins for usage within a test. I'm looking for how to ensure Jenkins itself is using OpenJDK 11 that I have installed and not the older JDK 8.

I have checked the Jenkins.xml and it does point to OpenJDK 11 as well as the %java_home% and PATH in the system environment are pointed to the correct locations.

When I check System Properties, I still see things related to Java 8 (java.home, java.specification.version, etc.)

I have no idea where else it could be stored at to change this.


Solution

  • In your Jenkins UI select Manage JenkinsStatus InformationSystem Information (displayed as System Properties then; in Jenkins 2.289.3, at least) → search for java.runtime.version or others to look for hints what's possibly going wrong.