Skip to content

Instantly share code, notes, and snippets.

@mherman22
Created February 15, 2024 18:14
Show Gist options
  • Save mherman22/41accca9bfa0ebf4ef15cdbca34c5c8b to your computer and use it in GitHub Desktop.
Save mherman22/41accca9bfa0ebf4ef15cdbca34c5c8b to your computer and use it in GitHub Desktop.
Install Oracle JDK 8 on Ubuntu 20 +
  • Head over to Oracle JDK 8 download page (https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). Accept the license agreement and download the tar.gz file. It will prompt you to create an Oracle account.
  • After logging into your Oracle account, you can download JDK 8. Then open up a terminal window and navigate to the download directory. Then extract the tar.gz file to /usr/lib/jvm/ directory using sudo tar xvf jdk-8u221-linux-x64.tar.gz --directory /usr/lib/jvm/
  • Now we can check Java version using /usr/lib/jvm/jdk1.8.0_221/bin/java -version where the Output is
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
  • Check Java compiler version using/usr/lib/jvm/jdk1.8.0_221/bin/javac -version where the Output is javac 1.8.0_221
@mherman22
Copy link
Author

i am using ubuntu 23.10 and this worked for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment