How can I check which JRE version I have?

I tried java -version, but it returned something like:

java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.14.04.1)
OpenJDK Zero VM (build 24.95-b01, mixed mode)

According to the program I am trying to start, it requires Oracle(R) Java(TM) Runtime Environment 7 or 8.

1

1 Answer

You need Oracle Java which you can install like this

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

and then setup like this

sudo apt-get install oracle-java8-set-default

Right now you have OpenJDK and as per your question you need Oracle Java. In case the JAVA_HOME is not setup properly you can do:

sudo vi /etc/environment
export JAVA_HOME=/path-to-java-before-bin-dir
source /etc/environment
3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like