Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a 64 bit Ubuntu installation with OpenJDK as default Java version.

jeffrey@jeffrey-Satellite-M645:~$ java -version java version "1.6.0_27" OpenJDK Runtime Environment (IcedTea6 1.12.5) (6b27-1.12.5-0ubuntu0.12.04.1) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) jeffrey@jeffrey-Satellite-M645:~$

I would like to change this to Oracle version:

jdk-6u43-linux-x64

I have downloaded the jdk-6u43-linux-x64.bin file and ran

sudo chmod a+x /usr/share/java/jdk-6u43-linux-x64.bin

followed by

sudo /usr/share/java/jdk-6u43-linux-x64.bin

I still cannot get the version to show in the list of possible versions when I run:

jeffrey@jeffrey-Satellite-M645:~$ sudo update-alternatives --config java
There is only one alternative in link group java: /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java
Nothing to configure.
jeffrey@jeffrey-Satellite-M645:~$

I have seen many posts on this site regarding this using specific tools or techniques that do not address my environment or the fact that I already have the binary file - I just need to install it and select it as default.

What am I not understanding? How do I get the bin file installed so that I can make it the default version.

share|improve this question
    
This was removed a few releases ago. You can go to java.com to find the latest version of the SDK for linux and install it manually. – kobaltz Jun 9 '13 at 16:33
    
Uninstall the Openjdk version first and then install the Oracle Java version. – kobaltz Jun 9 '13 at 16:34
    
@kibaltz - other posts recommend against uninstalling OpenJDK version because of dependency issues. – Android Addict Jun 9 '13 at 16:46
up vote 0 down vote accepted

Your java alternative is not installed (even if java program is installed).

You first need to run the following command :

update-alternatives --install /usr/bin/java java /path/to/bin/java 100

Then, you'll be able to execute update-alternatives --config java command.

share|improve this answer
    
It refers to your new java bin installation. (it should be something like /usr/java/jdk1.6.0_43/bin/java in your case) – ssssteffff Jul 10 '13 at 13:53

You must log in to answer this question.

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