LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-09-2006, 09:38 AM   #1
martian
LQ Newbie
 
Registered: Aug 2005
Distribution: RedHat, Ubuntu
Posts: 14

Rep: Reputation: 0
How does RPM work?


I'm running RedHat, and want to install the Java SDK 1.5 (I'm currently using 1.4). This isn't a package that is available under up2date, as near as I can tell from the RedHat Network website (rhn.redhat.com). So I'd like to install it using RPM. Everything else on my computer has been installed using up2date, and I'm worried that RPM will conflict with up2date.

Also, I'm wondering what exactly RPM and up2date do to "install" software. For example, I see some symbolic links in /usr/bin, and am guessing that these links were created by up2date? If I use RPM to update Java, will I need to update all of those symbolic links to point to the new JVM?

(As you can see, I know just enough to be dangerous, but not enough to be useful.)

Thanks for the help!

Chris
 
Old 03-09-2006, 10:00 AM   #2
Philosopher
Member
 
Registered: May 2005
Posts: 101

Rep: Reputation: 15
up2date is as far as I know nothing else but a rpm-frontend (somebody correct me please if Iīm wrong).
To install/ update your Java SDK just download the latest version from java.sun.com, open up a terminal, become root and then type
Code:
rpm -Uhv java-whatever.rpm
This should work for all rpm-based distributions. For more information about rpm type
Code:
man rpm
The symbolic links will be created by rpm, at least the ones nescassary to run Javaprograms. If youīre developer you maybe have to create your own symbolic links in /usr/bin (so did I under Mandriva 2006)
 
Old 03-09-2006, 10:02 AM   #3
caspervn
Member
 
Registered: Jul 2005
Location: Vietnam
Distribution: Fedora Core 2
Posts: 55

Rep: Reputation: 15
JVM installer creates folders and files in a particular folder which you have chose.
For example: you set folder containing JVM is /home/data/jvm, and installation of jvm's installed in this folder
 
Old 03-09-2006, 10:30 AM   #4
martian
LQ Newbie
 
Registered: Aug 2005
Distribution: RedHat, Ubuntu
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for the tips.

When I run

Code:
rpm -Uhv jdk-1_5_0_06-linux-i586.rpm
I get a message saying that the package is already installed. So I typed

Code:
java -version
and found out that the version of Java that I'm running is 1.4.2. Am I doing something wrong? I also see something about gij, which appears to be a GNU compiler for Java?

Thanks.
 
Old 03-09-2006, 10:37 AM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Something to think about:
which java will tell you the path to your java executable. This may be a link pointing to your (old) java1.4.2, check this with ls -al /path/to/java. If it is a link you'll need to delete it, and make a new link pointing to the java executable in your new java1.5.0
Or maybe I am barking up the wrong tree here!.

HTH
 
Old 03-09-2006, 10:56 AM   #6
blanks
Member
 
Registered: Jun 2004
Location: West Virginia
Distribution: Gentoo, Debian
Posts: 52

Rep: Reputation: 15
If you're interested in learning about how rpm works, check this out:
http://www.rpm.org/max-rpm/

It's probably the most comprehensive rpm documentation there is.
 
Old 03-09-2006, 11:06 AM   #7
Philosopher
Member
 
Registered: May 2005
Posts: 101

Rep: Reputation: 15
Seems you have two JDK versions now... but it doesnīt matter because different java versions donīt conflict. Itīs just up to you which one to choose.

My Java is installed in /usr/java/jdk1.5.0_06/ so I guess itīs the same on your system. There are two possibilities for you now: delete the old symbolic link and either create a new one or add /usr/java/jdk1.5.0_06/jre/bin to your path. Or donīt do anything and invoke the new java on the commandline when needed.
 
Old 03-09-2006, 12:00 PM   #8
martian
LQ Newbie
 
Registered: Aug 2005
Distribution: RedHat, Ubuntu
Posts: 14

Original Poster
Rep: Reputation: 0
It looks like the Java pointers go from /usr/bin -> /etc/alternatives -> /usr/lib/jvm/java-1.4.2-gcj/bin. I would like to change these to point to the updated 1.5 JVM, but I'm still having problems installing.

If I run "locate java", I find two *empty* directories labeled java-1.5.0. But RPM insists that Java 1.5 is installed. Ideas?

Last edited by martian; 03-09-2006 at 12:04 PM.
 
Old 03-09-2006, 12:13 PM   #9
Philosopher
Member
 
Registered: May 2005
Posts: 101

Rep: Reputation: 15
Try as root
Code:
# updatedb
and then again
Code:
> locate jdk
 
Old 03-09-2006, 12:40 PM   #10
martian
LQ Newbie
 
Registered: Aug 2005
Distribution: RedHat, Ubuntu
Posts: 14

Original Poster
Rep: Reputation: 0
/usr/java/jdk1.5.0_06/

Java 1.5 must have gotten installed at some point, without my realizing it, while I was trying to run RPM. So thanks for the help. I'll try updating those symbolic links.
 
  


Reply



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
RealPlayer10GOLD.rpm won't work bdmp Linux - Software 1 02-19-2005 07:03 AM
rpm does not work lapn99 Linux - General 3 07-20-2004 09:39 AM
rpm -Uvh does not work with header & rpm files in /var/spool/up2date jd_no7 Linux - Software 1 05-17-2004 05:24 PM
Does RPM work on Slackware ACJunior Slackware 2 07-21-2003 02:44 AM
rpm command won't work Travis86 Linux - Newbie 11 01-02-2003 05:22 AM

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

All times are GMT -5. The time now is 05:17 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
Open Source Consulting | Domain Registration