1

I want to install Oracle JDK on my Ubuntu 14.04. I tried using webupd8's method. The installer worked fine but the when I type java -version I get:

java version "1.7.0_55"
OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1)
OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode)

I even did sudo update-alternatives --config java and tried changing the Java that I use to Oracle's java but when I run java -version I still get the same IcedTea version. How do I switch the java that I use to Oracle's version?

1 Answer 1

0

If you do not want to use openjdk, I suggest you remove the openjdk completely. One easy way is to install synaptic which is a nice tool listing all available and installed packages and write in the quick filter openjdk select everything that is installed and remove it. (You have to wait a bit until it is finished indexing. It takes a lot of time only the first time you run synaptic)

If you want to keep openjdk as well then you should remove only the icedtea-plugin which is the plugin for the browsers. You should also type the command "which java", and from there follow the links which will lead you to the executable. Find the last link to the executable and change that to point to your preffered java. I think the links go like this: "which java"-> /usr/bin/java -> /etc/alternatives/java/-> .

the links from one file to another are shown if you use the command "ls -Alh" or its alias "ll" (that is two L's). if you want to list the first link to the java executable just write "ll /usr/bin/java".

1
  • 1
    I removed a package called open-jre-headless which solved the problem.
    – Pervy Sage
    Jul 23, 2014 at 22:51

You must log in to answer this question.

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