Requirements
You will need to know the path to the base Java folder (the path without /bin/java at the end) to provide it as the JAVA_HOME environment variable in the management service. The specific path to Java will vary depending on the platform, OS version, Open JDK vs. Oracle JDK, etc.
Following are different methods that you can use to find the path to Java on your system:
Reference the
JAVA_HOMEenvironment variable:$ echo $JAVA_HOME /usr/lib/jvm/java-21-openjdkUse
alternatives:$ alternatives --config java There is 1 program that provides 'java'. Selection Command ----------------------------------------------- *+ 1 java-21-openjdk.x86_64 (/usr/lib/jvm/java-21-openjdk- 21.0.3.0.9-1.el8.x86_64/bin/java) Enter to keep the current selection[+], or type selection number:Use
whereisto find "java" and follow the breadcrumbs:$ whereis java java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz $ ls -al /usr/bin | grep java$ lrwxrwxrwx 1 root root 22 Jul 18 09:35 java -> /etc/alternatives/java $ ls -al /etc/alternatives | grep java$ lrwxrwxrwx 1 root root 43 Jul 18 09:35 java -> /usr/lib/jvm/java-21-openjdk-21.0.3.0.9-1.el8.x86_64/bin/java