LinuxQuestions.org
Review your favorite Linux distribution.
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, 08:20 AM   #1
masuch
Member
 
Registered: Sep 2011
Location: /dev/null
Distribution: ubuntu 64bits
Posts: 135

Rep: Reputation: 1
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, 10:47 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,273

Rep: Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663Reputation: 2663
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, 11:24 AM   #3
masuch
Member
 
Registered: Sep 2011
Location: /dev/null
Distribution: ubuntu 64bits
Posts: 135

Original Poster
Rep: Reputation: 1
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 8 09-24-2014 05:44 AM
[SOLVED] apt-get install pkg_name returns "update-alternatives: command not found" bpeacocke Linux - Software 5 10-12-2011 10:16 PM
How do you use update-alternatives --set? vwr0527 Linux - Newbie 1 11-08-2007 12:49 AM
Install Java (update to new version) lionround Linux - Newbie 3 10-12-2007 11:21 PM
Please help to explain the syntax for 'update-alternatives' davidas Linux - Newbie 1 04-11-2004 07:22 AM


All times are GMT -5. The time now is 08:00 PM.

Main Menu
Advertisement
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