Custom Java settings
This article describes the installation of a custom Java for a specific service. In this case, JDK version 23.0.2 is installed for Trino specifically.
Install Java
-
Download the Java version you need on all hosts:
$ wget https://download.oracle.com/java/23/archive/jdk-23.0.2_linux-x64_bin.tar.gz -
Create a directory for custom Java on all hosts:
$ mkdir -p /tmp/jvm-example -
Unpack the package by the created path on all hosts:
$ sudo tar -xzf jdk-23.0.2_linux-x64_bin.tar.gz -C /tmp/jvm-example -
Check Java installation by running the command below to determine that the required Java version is used:
$ /tmp/jvm-example/jdk-23.0.2/bin/java --versionThe output:
java 23.0.2 2025-01-21 Java(TM) SE Runtime Environment (build 23.0.2+7-58) Java HotSpot(TM) 64-Bit Server VM (build 23.0.2+7-58, mixed mode, sharing)
Change Java settings in Trino
Go to ADCM interface and follow the steps below:
-
On the Clusters page, select the desired cluster.
-
Go to the Services tab and click at Trino.
-
Find and edit the ad-runtime-utils parameter as follows:
runtimes: java: version: "23.0.2" override_path: /tmp/jvm-example env_var: JAVA_HOME -
Click Apply and confirm changes to cluster configuration by clicking Save.
-
In the Actions drop-down menu, select Restart, make sure the Apply configs from ADCM option is set to
true, and click Run.