Download the JDK/JRE:
https://www.oracle.com/java/technologies/downloads/
Extract the file "
jdk-23_linux-x64_bin.tar.gz" in the folder you want to install Java:
/opt/jdk-23.0.2
Change the folder permissions:
Setup the environment variables
JAVA_HOME and
PATH:
-
Open the file ".profile":
-
Append the following lines:
-
Reload the file ".profile":
-
Verify the environment variables:
Locate the default java program file: