LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to install / create new update-java-alternatives ? (http://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-create-new-update-java-alternatives-4175428196/)

masuch 09-20-2012 07:20 AM

how to install / create new update-java-alternatives ?
 
Hi,

I have:
update-java-alternatives -l
ia32-java-6-sun 63 /usr/lib/jvm/ia32-java-6-sun
java-1.6.0-openjdk-amd64 1061 /usr/lib/jvm/java-1.6.0-openjdk-amd64
java-6-sun 63 /usr/lib/jvm/java-6-sun
java-gcj-4.6 /usr/lib/jvm/java-gcj-4.6

I would like to add:
java-7-oracle 59 /usr/lib/jvm/java-7-oracle

How can I do it by command ?
(I have found only solution to do it manually by creating file /usr/lib/jvm/java-7-oracle)

thank you,
kind regards,
M.

knudfl 09-20-2012 09:47 AM

Adding an entry in /etc/alternatives/ :
Code:

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-7-oracle/jre/bin/java 4000
(Edit "/usr/lib/jvm/java-7-oracle/jre/bin/java" to actual path, if different.)

masuch 09-20-2012 10:24 AM

Quote:

Originally Posted by knudfl (Post 4785126)
Adding an entry in /etc/alternatives/ :
Code:

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-7-oracle/jre/bin/java 4000
(Edit "/usr/lib/jvm/java-7-oracle/jre/bin/java" to actual path, if different.)

It does not work for me.
I am using update-alternatives --install .../jvm for all "java" commands (doing it by my own oracle java installation script).
It has influence on:
sudo update-alternatives --config java
BUT it does not have influence on
sudo update-java-alternatives -l


All times are GMT -5. The time now is 04:28 PM.