Posted over 8 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

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.

makandra has been working exclusively with Ruby on Rails since 2007. Our laser focus on a single technology has made us a leader in this space.

Owner of this card:

Avatar
Thomas Eisenbarth
Last edit:
about 1 month 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