Last updated on September 9, 2020 by Dan Nanni
Java Runtime Environment (JRE) or Java Runtime is a minimal set of Java SDK, which allows one to run Java applications. JRE consists of Java Virtual Machine (JVM), libraries, and other supporting components. If you want to run a complied Java application, you do not have to install a full-featured Java development kit, but just need JRE installed.
There are two choices for setting up JRE on Linux: use either Oracle JRE or OpenJDK JRE (open source implementation of the Java Platform). Choose either one you prefer, as described in the following.
Go to Oracle website, and click on
JRE Download link.
On the next page, accept Oracle license agreement. Then download a file according to your Linux system:
To install Oracle JRE on RPM-based Linux:
$ sudo rpm -ivh jre1.7.0_45-linux-<arch>.rpm
To install Oracle JRE on non RPM-based Linux:
$ sudo mkdir -p /usr/java $ sudo tar xvfvz jre1.7.0_45-linux-<arch>.tar.gz -C /usr/java
After installation, set the following environment variables in
To install OpenJDK Java Runtime on Debian, Ubuntu or Linux Mint:
$ sudo apt-get install openjdk-7-jre
To install OpenJDK Java Runtime on Fedora, CentOS or RHEL:
$ sudo yum install java-1.7.0-openjdk
After installation, set JAVA_HOME environment variable in
If you cannot find
/etc/alternative/jre folder, set
JAVA_HOME to an alternative path (e.g.,
Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.