Install specific JRE on Ubuntu using apt Command


Installing Java JRE (Runtime Environment) is very simple using apt package manager, but what if you want to install a specific version of JRE say Java 8?

To install a specific version of JRE you should first make sure to update the apt package manage by running the command - apt update, once you do that you can search for JRE to know all versions available using apt-cache search jre

# apt-cache search jre

default-jre - Standard Java or Java compatible Runtime
default-jre-headless - Standard Java or Java compatible Runtime (headless)
openjdk-11-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-11-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)

libjreen-qt5-1 - powerful Jabber/XMPP library implemented in Qt5/C++
libjreen-qt5-dbg - powerful Jabber/XMPP library (Qt5 build) - debugging symbols
libjreen-qt5-dev - powerful Jabber/XMPP library (Qt5 build) - development files
libjregex-java - regular expressions for Java

openjdk-11-jre-zero - Alternative JVM for OpenJDK, using Zero
openjdk-17-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-17-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-17-jre-zero - Alternative JVM for OpenJDK, using Zero
openjdk-18-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-18-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-18-jre-zero - Alternative JVM for OpenJDK, using Zero
openjdk-8-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-8-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-8-jre-zero - Alternative JVM for OpenJDK, using Zero/Shark
openjdk-19-jre - OpenJDK Java runtime, using Hotspot JIT
openjdk-19-jre-headless - OpenJDK Java runtime, using Hotspot JIT (headless)
openjdk-19-jre-zero - Alternative JVM for OpenJDK, using Zero
Install JDK on Ubuntu

Now to install openjdk-17-jre simple use the command,

apt install openjdk-17-jre

This post was last reviewed and updated on 30 July 2023.

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap