LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-20-2012, 07:20 AM   #1
masuch
Member
 
Registered: Sep 2011
Location: /dev/null
Distribution: ubuntu 64bits
Posts: 129

Rep: Reputation: Disabled
Question 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.
 
Old 09-20-2012, 09:47 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
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.)
 
Old 09-20-2012, 10:24 AM   #3
masuch
Member
 
Registered: Sep 2011
Location: /dev/null
Distribution: ubuntu 64bits
Posts: 129

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
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
 
  


Reply

Tags
alternative, install, java, update


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add a program to update-alternatives Mountain Linux - Software 7 06-09-2013 11:12 AM
[SOLVED] apt-get install pkg_name returns "update-alternatives: command not found" bpeacocke Linux - Software 5 10-12-2011 09:16 PM
How do you use update-alternatives --set? vwr0527 Linux - Newbie 1 11-07-2007 11:49 PM
Install Java (update to new version) lionround Linux - Newbie 3 10-12-2007 10:21 PM
Please help to explain the syntax for 'update-alternatives' davidas Linux - Newbie 1 04-11-2004 06:22 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration