To those that are not familiarized with the command line, and are in a
hurry to configure your java definitions properly (say, you just
installed Trusty and need this working right now), you can do this:

1. Unpack the tar.gz file from the Oracle site to /usr/lib/jvm/java-7
-oracle-jdk-amd64

2. Perform the following commands:

sudo update-alternatives --install /usr/bin/java java 
/usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/java 1000
sudo update-alternatives --install /usr/bin/jexec jexec 
/usr/lib/jvm/java-7-oracle-jdk-amd64/jre/lib/jexec 1000
sudo update-alternatives --install /usr/bin/keytool keytool 
/usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/keytool 1000
sudo update-alternatives --install /usr/bin/orbd orbd 
/usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/orbd 1000
sudo update-alternatives --install /usr/bin/pack200 pack200 
/usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/pack200 1000
sudo update-alternatives --install /usr/bin/policytool policytool 
/usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/policytool 1000
sudo update-alternatives --install /usr/bin/rmid rmid 
/usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/rmid 1000
sudo update-alternatives --install /usr/bin/rmiregistry rmiregistry 
/usr/lib/jvm/java-7-oracle-jdk-amd64/bin/rmiregistry 1000
sudo update-alternatives --install /usr/bin/servertool servertool 
/usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/servertool 1000
sudo update-alternatives --install /usr/bin/tnameserv tnameserv 
/usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/tnameserv 1000
sudo update-alternatives --install /usr/bin/unpack200 unpack200 
/usr/lib/jvm/java-7-oracle-jdk-amd64/jre/bin/unpack200 1000

3. And then select the proper alternatives (in case you had another
distribution installed, like OpenJDK) with the commands:

sudo update-alternatives --config java
sudo update-alternatives --config jexec
sudo update-alternatives --config keytool
sudo update-alternatives --config pack200
sudo update-alternatives --config policytool
sudo update-alternatives --config rmid
sudo update-alternatives --config rmiregistry
sudo update-alternatives --config servertool
sudo update-alternatives --config tnameserv
sudo update-alternatives --config unpack200

For each of these, you will be prompted to select the alternative you
want. You will be prompted with a list of choices. Select the one you
just defined in the commands under item 2, above. They are the ones
pointing to java-7-oracle-jdk-amd64.

This is pretty self-explanatory. Just in case someone on the web find
this on Google and needs help. ;-)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1309709

Title:
  galternatives cannot add or choose alternatives

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/galternatives/+bug/1309709/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to