Skip to content

Instantly share code, notes, and snippets.

@tranduydat
Created August 11, 2020 17:27
Show Gist options
  • Save tranduydat/2f31b04911c68043974565b51fcb0b18 to your computer and use it in GitHub Desktop.
Save tranduydat/2f31b04911c68043974565b51fcb0b18 to your computer and use it in GitHub Desktop.
Install Oracle JDK 1.8 (or newer) on Ubuntu
# 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