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.sstatic.net/Sh7GU.png
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
- 14,198
- 5
- 41
- 43
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
- 5,013
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,277
Have you already tried to install openjdk-7-jre?
sudo apt-get install openjdk-7-jre
- 14,969
- 44