LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-25-2007, 09:08 PM   #1
paragkalra
Member
 
Registered: Sep 2006
Location: Nagpur, Maharashtra, India
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Posts: 221

Rep: Reputation: 31
32 bit JDK vs 64 bit JDK


Hello all,

I have a 64 bit machine with 64 bit RHEL 5 installed over it. I first installed 32 bit JDK (jdk-1_5_0_12-linux-i586.rpm) on it.

#rpm -qa | grep jdk shows following output:
jdk-1.5.0_12-fcs

I then uninstalled the 32 bit JDK and installed 64 bit JDK (jdk-1_5_0_12-linux-amd64-rpm). Everything went fine.

However #rpm -qa | grep jdk still shows the same output i.e.:
jdk-1.5.0_12-fcs

Does anyone know how to verify the architecture of JDK being used?
 
Old 11-26-2007, 04:55 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 57
Try expanding your query; rpm -qa --qf="%{n}-%{v}-%{r}.%{arch}\n" jdk

$ rpm -qa --qf="%{n}-%{v}-%{r}.%{arch}\n" jdk
jdk-1.7.0-ea.i586


You could create a litle .rpmmarco file;
Code:
%_topdir      %(echo $HOME)/rpmbuild
%_smp_mflags  -j3
%__arch_install_post   /usr/lib/rpm/check-rpaths   /usr/lib/rpm/check-buildroot
%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}
Then all you need to type is: rpm -qa jdk

$ rpm -qa jdk
jdk-1.7.0-ea.i586
 
Old 11-27-2007, 03:14 AM   #3
paragkalra
Member
 
Registered: Sep 2006
Location: Nagpur, Maharashtra, India
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Posts: 221

Original Poster
Rep: Reputation: 31
Thanx Lenard........
 
Old 11-27-2007, 08:59 PM   #4
paragkalra
Member
 
Registered: Sep 2006
Location: Nagpur, Maharashtra, India
Distribution: Debian, Ubuntu, Redhat, Fedora, SLES, OpenSUSE, FreeBSD, Mac OS X
Posts: 221

Original Poster
Rep: Reputation: 31
Smile

@Lenard: Your reply has solved my problem. Thanks once again.

Can anyone please provide the explaination on how does the first command (rpm -qa --qf="%{n}-%{v}-%{r}.%{arch}\n" jdk) suggested by Lenard actually work?
 
Old 11-28-2007, 05:36 AM   #5
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 57
Maybe if one expands the format a bit will help;

rpm -[q]uery[a]ll installed packages --q[uery]f[ormat]="%{name}-%{version}-%{release}.%{arch}\n" (for) jdk

Read: man rpm
 
  


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
JDK 1.6.0 32-bit and 64-bit on Same System (FC6)? sancho Fedora 3 01-23-2007 06:20 AM
no KDE in Kubuntu 6.10 64-bit(ATI X800 GTO 256 bit DDr3) exul182 Linux - Hardware 2 01-04-2007 02:47 PM
Integrated 16-bit Sound Blaster Pro compatible audio 24-bit DAC jelgavchik Linux - Laptop and Netbook 2 11-16-2006 09:20 PM
Integrated 16-bit Sound Blaster Pro compatible audio 24-bit DAC jelgavchik Linux - Hardware 1 11-16-2006 05:31 PM
32 bit or 64 bit install - is 32 bit easier for a newbie? dms05 Linux - Newbie 3 05-19-2006 03:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:07 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration