Рет қаралды 3,525
This video shows how to install Adoptium JDK (good alternative to OpenJDK or Oracle JDK) on Linux Ubuntu.
Download it on: adoptium.net.
The Adoptium project was created in 2017, and it was moved to the Eclipse Foundation in 2020.
Here are all the commands you're going to need:
tar xzf OpenJDK17U-*.tar.gz
mv jdk-17* /usr/lib/jvm/.
cd $HOME // to check the bash
Note: You should put the exports in bashrc or bash_profile.
gedit ~/.bashrc
export JAVA_HOME=/usr/lib/jvm/jdk-17*/bin
export PATH:$PATH:/usr/lib/jvm/jdk-17*/bin
If you're using Ubuntu 22.04 (Jammy Jellyfish), use this:
export JAVA_HOME=/usr/lib/jvm/jdk-17*/bin
export PATH=$JAVA_HOME:$PATH
source ~/.bashrc
java -version