Java Development Kit (JDK)
This page documents the supported JDK runtimes for OpenSource Data Platform (ODP) 1.3.1.0, including how to validate the exact minor/build installed on each operating system and how to configure separate Java homes for Ambari Server vs stack components.
Supported JDK Runtimes
Ambari and the ODP stack can use different Java homes.
| Area | Supported JDK major versions | Notes |
|---|---|---|
| Ambari Server runtime | JDK 17 | Ambari Server requires JDK 17. |
| ODP stack runtime (default) | JDK 8 | Many stack components still default to JDK 8. |
| ODP stack runtime (ODP 1.3+) | JDK 8 and JDK 17 | Full stack migration to JDK 17 is supported on ODP 1.3+. |
Apache Ambari
| Name | Version | |
|---|---|---|
| OracleJDK | ||
| JDK7 | JDK8 | JDK17 |
| OpenJDK | ||
| JDK7 | JDK8 | JDK17 |
Distribution ODP Hadoop
| Name | Version | |
|---|---|---|
| OracleJDK | ||
| JDK7 | JDK8 | JDK17 |
| OpenJDK | ||
| JDK7 | JDK8 | JDK17 |
Install JDK Packages
Install JDK 17 (for Ambari Server) and keep JDK 8 available for stack components unless your target ODP release supports a full JDK 17 stack runtime.
- Ubuntu 22/24
- RHEL/CentOS/Rocky/Alma 8/9
sudo apt update -y
sudo apt install -y openjdk-17-jdk
sudo apt install -y openjdk-8-jdk
sudo dnf install -y java-17-openjdk java-17-openjdk-devel
sudo dnf install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel
Exact package names and availability depend on your OS version and enabled repositories.
Validate JDK Version (Major + Minor/Build)
Always validate the exact JDK build installed on each host.
Validate by JAVA_HOME
If you know the Java homes, validate them directly:
/path/to/jdk8/bin/java -version 2>&1 | head -n 1
/path/to/jdk17/bin/java -version 2>&1 | head -n 1
Expected output patterns:
- JDK 8:
1.8.0_... - JDK 17:
17.0...
Validate the OS package build (recommended)
- Ubuntu (apt)
- RHEL-family (dnf/rpm)
dpkg -l | egrep 'openjdk-(8|17)-jdk($|:)' || true
apt-cache policy openjdk-8-jdk | sed -n '1,20p'
apt-cache policy openjdk-17-jdk | sed -n '1,20p'
rpm -q java-1.8.0-openjdk java-17-openjdk || true
rpm -qi java-1.8.0-openjdk | sed -n '1,40p'
rpm -qi java-17-openjdk | sed -n '1,40p'
dnf --showduplicates list java-1.8.0-openjdk java-17-openjdk | tail -n +1
Configure Java Homes for Ambari and ODP
Ambari Server can be configured with separate Java homes:
--java-home: the Java home distributed/used for stack components on cluster hosts.--ambari-java-home: the Java home used by the Ambari Server process itself.
1) Find the Java homes
Common locations include:
- Ubuntu:
/usr/lib/jvm/java-1.8.0-openjdk-amd64,/usr/lib/jvm/java-17-openjdk-amd64/ - RHEL-family:
/usr/lib/jvm/java-1.8.0-openjdk,/usr/lib/jvm/java-17-openjdk/
If needed, you can locate Java homes with:
readlink -f "$(command -v java)"
update-alternatives --list java 2>/dev/null || true
2) Run Ambari setup with both homes
Run on the Ambari Server host.
sudo su -
ambari-server setup --silent \
--java-home=/usr/lib/jvm/java-1.8.0-openjdk-amd64 \
--ambari-java-home=/usr/lib/jvm/java-17-openjdk-amd64/
If your Ambari Server uses an external database, include the database arguments (--database, --databasehost, etc.) in the same command.
3) Restart Ambari Server
Restart is required for the new JAVA_HOME settings to take effect.
sudo systemctl restart ambari-server
If systemd is not used:
ambari-server restart
Java Alternatives (when applicable)
Some distributions may switch the default java alternative to JDK 17 automatically. If your target stack runtime still requires JDK 8, ensure the system default java points to JDK 8 where required.