LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-21-2012, 11:36 PM   #1
kujirasan
Member
 
Registered: Mar 2007
Posts: 117

Rep: Reputation: 16
Installing Oracle jdk on Debian Squeeze Using Update Alternatives


Trying to install Oracle jdk(jdk1.7.0_04) using update alternatives procedure.

This the file
jdk1.7.0_04,

This one method posted on the Internet, this apparently for 64bit version, shouldn't that lib in the update command be lib64?


wget http://download.oracle.com/otn-pub/j...nux-x64.tar.gz
tar zxvf jdk-7-linux-x64.tar.gz -C /usr/lib64/jvm/


update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0/bin/java 1065
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0/bin/javac 1065

Can any one help?
Thanking you in advance.
 
Old 05-22-2012, 03:57 PM   #2
cheesus
Member
 
Registered: Jan 2005
Location: Munich, Germany
Distribution: SuSE
Posts: 183

Rep: Reputation: 25
since you have the "v" option on tar, it shows you which path it actually unpacks.
that should match the update-alternatives command.
if you do "update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0/bin/java 1065"
then obviously you should have a file "/usr/lib/jvm/jdk1.7.0/bin/java" (and yes, probably should be "lib64" in your case).
if you don't have the file, try "find /usr/lib64/jvm/ -name java" to find out the real path.
good luck! -tom.
 
Old 05-22-2012, 04:06 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,563

Rep: Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512Reputation: 2512
Quote:
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0/bin/java 1065
This part : "/usr/lib/jvm/jdk1.7.0/bin/java" is a suggested path,
which must be edited to the actual path : /usr/lib64/jvm/jdk1.7.0/bin/java
 
Old 05-22-2012, 05:03 PM   #4
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,732
Blog Entries: 12

Rep: Reputation: 456Reputation: 456Reputation: 456Reputation: 456Reputation: 456
Take a look at :http://forum.linuxmint.com/viewtopic...art=20#p575760
 
Old 05-29-2012, 06:06 AM   #5
kujirasan
Member
 
Registered: Mar 2007
Posts: 117

Original Poster
Rep: Reputation: 16
This link caters for Linux Mint, http://forum.linuxmint.com/viewtopic...art=20#p575760,
this is quote from it Move the folder jre1.7.0_VERSION with root rights to /opt/java/32/ or /opt/java/64/

In Debian Squeeze 64 bit the java packages are located in usr/lib64/jvm,
Following those procedures by way of copy and paste, will lead to complete disaster!
Making this so difficult , it really verges on sheer lunacy, there is a software called Parted Magic , it is based on Debian, once loaded, with one click it installs latest Java and updates Firefox to the latest version, with Debian, is the usual somersaults and joggling. May the person that does the Parted Magic should step in and relieve the problem. The icedtea is just a nuisance and piece of humbug.
 
Old 05-29-2012, 10:15 AM   #6
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,732
Blog Entries: 12

Rep: Reputation: 456Reputation: 456Reputation: 456Reputation: 456Reputation: 456
$ java -version
java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) Client VM (build 23.0-b21, mixed mode)


Java(TM) Plug-in 1.7.0_04

File: /usr/lib/jvm/j2re1.7-oracle/lib/i386/libnpjp2.so


Howto install Oracle Java on Debian
https://www.linuxquestions.org/quest...-debian-34567/
 
Old 05-30-2012, 10:16 PM   #7
kujirasan
Member
 
Registered: Mar 2007
Posts: 117

Original Poster
Rep: Reputation: 16
Hi Evil, thanks for the reply and your help to every one, very much appreciated, I managed to install it,
replaced jdk1.7.0, with jdk1.7.0_04, in the two lines of update-alternatives
then browesed to file jvm (/usr/lib/jvm) and typed the update-alternative lines!
However did not try to change the icedtea in Iceweasel, as I don't know how to link it in the 64 bit system.


here are 5 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/lib/jvm/jdk1.7.0_04/bin/java 1065 auto mode
1 /usr/bin/gij-4.4 1044 manual mode
2 /usr/lib/jvm/ia32-java-6-sun/jre/bin/java 63 manual mode
3 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
4 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode
5 /usr/lib/jvm/jdk1.7.0_04/bin/java 1065 manual mode

java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)



jdk1.7.0_04

tar zxvf jdk-7-linux-x64.tar.gz -C /usr/lib64/jvm/

update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0/bin/java 1065
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.7.0/bin/javac 1065
 
Old 07-23-2014, 10:53 PM   #8
linuxStudent11
Member
 
Registered: Jun 2007
Posts: 103

Rep: Reputation: 16
I'm feeling a flaming rant coming on but I'm not sure this is the right place.

I don't think update-alternatives has enough features to justify its existence. This is especially noticeable every time we get a new java update. So where is the best place to vent my spleen (yech!) on this subject

Pardon the mess.
 
  


Reply


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
Installing Oracle XE 11g on Debian Squeeze kujirasan Debian 9 01-27-2012 06:34 AM
[SOLVED] Firefox nightly on Debian 64 bit squeeze don't update AleLinuxBSD Debian 2 04-14-2011 12:29 AM
[SOLVED] What happens if I update Debian Squeeze from Lenny's source.list? RouterRat Linux - Newbie 6 03-22-2011 11:58 PM
Debian squeeze and RAID firmware after kernel update melco Linux - Hardware 2 03-21-2011 04:53 PM
Configure sources.list for Debian squeeze weekly update. werepacman Linux - Newbie 2 07-07-2009 10:29 AM


All times are GMT -5. The time now is 01:53 AM.

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