Installing Java Development Kit
You must have the Java Development Kit (JDK) installed on your system prior to installing the Eclipse integrated development environment (IDE). {ProductFullName} supports the following JDKs:
-
OpenJDK 11
-
OpenJDK 17
-
Oracle JDK 11
-
Oracle JDK 17
-
Eclipse Temurin™ JDK 11
-
Eclipse Temurin™ JDK 17
-
From the Oracle JDK download page, download the JDK
tar.gz
file suitable for your system.NoteYou need to accept the Oracle license agreement to proceed.
Alternatively, you can download JDK by using the command-line interface:
$ wget https://download.oracle.com/java/11/latest/<jdk-file>
-
Extract the
tar.gz
file:$ tar -xzf <jdk-file>
-
Optional: To make JDK available system-wide, move the extracted folder to the
/opt
directory:$ sudo mv <jdk-extracted-folder> /opt/<jdk-file>
-
Set up the
JAVA_HOME
environment variable and add the JDKbin
directory to thePATH
variable:-
Open the
.bashrc
file:$ nano ~/.bashrc
-
Add the following lines to the file:
export JAVA_HOME=/opt/<jdk-file> export PATH=$PATH:$JAVA_HOME/bin
-
Save the file and close it.
-
To apply the new changes, reload the file:
$ source ~/.bashrc
-
-
Use the
java --version
command to verify the installed JDK version:$ java --version