Skip to content
Advertisement

Can’t Install Jenkins even though I have JAVA 8

Ubuntut 14.04 LTS

According to this I need JAVA 8 and so I downloaded both the JDK and JRE. Unfortunately when attempting to install jenkins again

JavaScript

I still get the error message

JavaScript

Checking my $PATH and it shows the following

JavaScript

The java that should be used is 8. Even running

JavaScript

Gives me what I expect

JavaScript

Why do I get the java version error if I have JAVA 8 installed? What more do I have to do to ensure that JAVA 8 is the default?

I was unsuccessful in trying

JavaScript

and got

JavaScript

Side note, when attempting to run eclipse from the side bar I get an error about the JAVA version as well. Running eclipse from command line works fine though.

Does it have to with default-java symbolic link in my /usr/lib/jvm folder? It points to the Java 7 openjdk… Doing ls -la shows the links

JavaScript

Advertisement

Answer

Looking into update-java-alternatives and update-alternatives, I came across this answer

I checked the current alternatives for java

JavaScript

and got

JavaScript

Using one of the answers I found, I added the alternative for the java executable doing the following command

JavaScript

Then I checked again to see that my alternate java was available in the list

JavaScript

Which now gave me

JavaScript

Then I entered 2 and tried to install and it worked. I can even run eclipse now from the side bar instead of having to run it from command line.

I appreciate the point in the right direction RealSkeptic!

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement