I have Ubuntu 14.04 and I need the latest version of Java JRE to run certain games but I have the old version and I do not know how I can update it. I tried downloading it from https://java.com/download but I couldn't rub the downloaded file, Also tried looking at other people's questions but I couldn't really understand them.The error I get is "the application requires a Java runtime environment 1.6.0" Here's a screen shot of the error: https://i.stack.imgur.com/Sh7GU.png
-
1Do you want an OpenJDK JRE or an Oracle one? – Pilot6 Jun 08 '16 at 11:51
-
I don't really know, i'm just trying to solve the error "the application requires a Java runtime environment 1.6.0" – HamzaKC Jun 08 '16 at 12:39
4 Answers
WebUpd8
Webupd8 offers a ppa on Launchpad which offers Java installers for all current Ubuntu releases.
PPA description:
Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK7 / JDK8 / JDK9). There are no actual Java files in this PPA.
More info (and Ubuntu installation instructions):
- for Oracle Java 7: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
- for Oracle Java 8: http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
Debian installation instructions:
- Oracle Java 7: http://www.webupd8.org/2012/06/how-to-install-oracle-java-7-in-debian.html
- Oracle Java 8: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html
Important!!! For now, you should continue to use Java 8 because Oracle Java 9 is available as an early access release (it should be released in 2016)! You should only use Oracle Java 9 if you explicitly need it, because it may contain bugs and it might not include the latest security patches! Also, some Java options were removed in JDK9, so you may encounter issues with various Java apps. More information and installation instructions (Ubuntu / Linux Mint / Debian): http://www.webupd8.org/2015/02/install-oracle-java-9-in-ubuntu-linux.html
In case you need Java 8 - simple do as follows:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

- 13,272
- 5
- 39
- 43
-
I followed the steps but still while running the games I get the error that I don't have Java 1.6.0 – HamzaKC Jun 08 '16 at 12:22
-
-
@HamzaKC, Type
sudo apt-get install oracle-java8-set-default
to fix that. There's a script in that ppa which sets Java 8 as default, installing it should fix the problem. – Jonas Czech Jun 08 '16 at 13:28
You can use default-jre
which is a simple package basically equivalent to openjdk-jre:
Verify if Java is already Installed
As you tried many things before you'll want to check if Java is not already installed
java -version
If it returns The program java can be found in the following packages
you can move forward to the next steps.
Installing default JRE
First, update the package index
sudo apt-get update
Then install JRE with apt-get
sudo apt-get install default-jre
Installing JDK
You may want to install JDK which is usually needed to compile Java applications
sudo apt-get install default-jdk
You can as well install other versions of JDK like OpenJDK
and Oracle JDK

- 4,973
-
How do I completely remove the previous Java installed so I can install the new one? – HamzaKC Jun 08 '16 at 13:12
-
I don't understand .. If it's Installed why you want to install it again ? – storm Jun 08 '16 at 13:20
-
I'm just trying to get rid of the error, other threads show that re-installing a newer version fixes the issue. – HamzaKC Jun 08 '16 at 15:36
-
-
java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b108) Java HotSpot(TM) Server VM (build 25.0-b50, mixed mode) – HamzaKC Jun 08 '16 at 18:22
You can try installing openjdk-6 version from software center or directly via terminal like this
sudo apt-get install openjdk-6-jre
Hope that helps.
Regards Douglas

- 1,267
- 11
- 12
-
I have installed java with the help of the other answers but the error wont go away. – HamzaKC Jun 08 '16 at 18:23
-
two things.. if you have jre-6, ensure its the default jre in the system. you can check with the -version argument but if its not, set it using the update-alternatives command – Zuko Jun 08 '16 at 19:24
-
so long as you have java 1.6 installed.. just make sure its the default jre in the system – Zuko Jun 08 '16 at 19:26
-
-
sudo update-alternatives --config java
and type in the [XX] number listed next to the version you wish to set as default then enter – Zuko Jun 08 '16 at 22:45
Have you already tried to install openjdk-7-jre?
sudo apt-get install openjdk-7-jre

- 14,809

- 44
-
When I tried that I got this: "Unable to locate package openjdk-9-jre" – HamzaKC Jun 08 '16 at 11:51
-
1
-
-
-
-
-