1

I am trying to install Java 8 via the download from Oracle and jdk-8u211-linux-x64.tar.gz file. There is many posts which cover install of Java 8 on Ubuntu but none work any more since as of April 16 you cant install via apt. When I download file and extracted it and move to the /usr/local/jdk1.8.0_211/ dir and I tried to run java -v to get the installed java version but I am getting this error:

The program 'java' can be found in the following packages:  
           * default-jre  
           * gcj-5-jre-headless  
           * openjdk-8-jre-headless  
           * gcj-4.8-jre-headless  
           * gcj-4.9-jre-headless  
           * openjdk-9-jre-headless

So what do I need to do to get Java correctly registered so I can use it.

0

1 Answer 1

0

After a bit more searching i found the answer that worked for me. But i am always surprised why it has to be so difficult to get JAVA installed on your system. Would be nice if the guys at Oracle take the head out of there ass and actually enable people to use Java instead of making it harder to use with there Lic changes.

Here is also a post which discusses multiple methods of how to install java Post on how to install JAVA JRE

#!/bin/sh

tar -xvf jdk-8*
sudo mkdir /usr/lib/jvm
sudo mv ./jdk1.8* /usr/lib/jvm/jdk1.8.0
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.8.0/bin/javaws" 1
sudo chmod a+x /usr/bin/java
sudo chmod a+x /usr/bin/javac
sudo chmod a+x /usr/bin/javaws

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .