Skip to main content
Version: 1.3.1.0

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.

AreaSupported JDK major versionsNotes
Ambari Server runtimeJDK 17Ambari Server requires JDK 17.
ODP stack runtime (default)JDK 8Many stack components still default to JDK 8.
ODP stack runtime (ODP 1.3+)JDK 8 and JDK 17Full stack migration to JDK 17 is supported on ODP 1.3+.

Apache Ambari

NameVersion
OracleJDK
JDK7JDK8JDK17
OpenJDK
JDK7JDK8JDK17

Distribution ODP Hadoop

NameVersion
OracleJDK
JDK7JDK8JDK17
OpenJDK
JDK7JDK8JDK17

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.

sudo apt update -y
sudo apt install -y openjdk-17-jdk
sudo apt install -y openjdk-8-jdk
note

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...
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'

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/
info

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.