Knowledge Base

An archive of my personal knowledge base.

Install Java (OpenJDK) on Linux

Cristian Sulea

Debian, Ubuntu, etc.

On the command line, type:

$ sudo apt-get install openjdk-8-jre

The openjdk-8-jre package contains just the Java Runtime Environment.
If you want to develop Java programs then please install the openjdk-8-jdk package.

Fedora, Oracle Linux, Red Hat Enterprise Linux, etc.

On the command line, type:

$ su -c "yum install java-1.8.0-openjdk"

The java-1.8.0-openjdk package contains just the Java Runtime Environment.
If you want to develop Java programs then install the java-1.8.0-openjdk-devel package.

JDK 7

Debian, Ubuntu, etc.

On the command line, type:

$ sudo apt-get install openjdk-7-jre

The openjdk-7-jre package contains just the Java Runtime Environment.
If you want to develop Java programs then install the openjdk-7-jdk package.

Fedora, Oracle Linux, Red Hat Enterprise Linux, etc.

On the command line, type:

$ su -c "yum install java-1.7.0-openjdk"

The java-1.7.0-openjdk package contains just the Java Runtime Environment.
If you want to develop Java programs then install the java-1.7.0-openjdk-devel package.


Resources

Share on Twitter