Created
August 11, 2020 17:27
-
-
Save tranduydat/2f31b04911c68043974565b51fcb0b18 to your computer and use it in GitHub Desktop.
Install Oracle JDK 1.8 (or newer) on Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Go to https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html | |
# then download 'jdk-8u261-linux-x64.tar.gz' (for Linux 64-bit) | |
# cd to your Downloads directory then run Terminal | |
sudo mkdir -p /usr/lib/jdk | |
sudo tar zxvf jdk-8u261-linux-x64.tar.gz -C /usr/lib/jdk | |
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jdk/jdk1.8.0_261/bin/java" 1 | |
sudo update-alternatives --set java /usr/lib/jdk/jdk1.8.0_261/bin/java | |
java -version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment