Posted about 9 years ago. Visible to the public.

Sun Java JVM/JRE on Ubuntu Linux

Note that you should disable the Java plug-in in your browsers after installation.

Ubuntu >= 12.04

Java 11

Copy
sudo apt install openjdk-11-jre-headless

Java 10

Copy
sudo add-apt-repository ppa:linuxuprising/java sudo apt-get update sudo apt-get install oracle-java10-installer

Java 8

You probably want to get rid of OpenJDK (which is installed by default and leads to bad RubyMine performance):

Copy
sudo apt-get purge openjdk-\*

Now follow instructions in this article:

Copy
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer

You can now check your default JVM with java -version.

It is possible to have multiple versions of java on the same machine. You can easily switch the system default java version:

Copy
sudo update-alternatives --config java

Note: Some programs rely on the $JAVA_HOME environment variable, which might differ from java -version. Run your program like this to avoid this problem: JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java /opt/your_program

Ubuntu 11.04 (Natty Narwhal)

  • In your Applications menu, open the Ubuntu Software Center.
  • Edit -> Software Sources -> Other Software
  • Check Canonical Partners and Canonical Partners Source Code

You probably want to get rid of OpenJDK (which is installed by default and leads to bad RubyMine performance):

Copy
sudo apt-get remove openjdk*

Now you can install the official Java JRE:

Copy
sudo apt-get update sudo apt-get install sun-java6-jre

You can now check your default JVM with java -version. It should be Sun's.

Ubuntu 10.10 (maverick)

This possibly works for versions below 10.10. If it does, please update this note.

Copy
sudo add-apt-repository ppa:sun-java-community-team/sun-java6

You probably want to get rid of OpenJDK (which is installed by default and leads to bad RubyMine performance):

Copy
sudo apt-get remove openjdk*

Now you can install the official Java JRE:

Copy
sudo apt-get update sudo apt-get install sun-java6-jre

You can now check your default JVM with java -version. It should be Sun's.

Ubuntu < 10.10

To install the Sun Java Virtual Machine (JVM) e.g. on Ubuntu Linux 9.10 (karmic):

Open /etc/apt/sources.list, put

Copy
deb http://archive.ubuntu.com/ubuntu/ karmic multiverse deb-src http://archive.ubuntu.com/ubuntu/ karmic multiverse

You probably want to get rid of OpenJDK (which is installed by default and leads to bad RubyMine performance):

Copy
sudo apt-get remove openjdk*

Now you can install the official Java JRE:

Copy
sudo apt-get update sudo apt-get install sun-java6-jre

You can now check your default JVM with java -version. It should be Sun's.

Once an application no longer requires constant development, it needs periodic maintenance for stable and secure operation. makandra offers monthly maintenance contracts that let you focus on your business while we make sure the lights stay on.

Owner of this card:

Avatar
Thomas Eisenbarth
Last edit:
8 months ago
by Emanuel De
Keywords:
jdk, oracle
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Thomas Eisenbarth to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more