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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-01-2003, 08:44 PM
|
#1
|
|
LQ Newbie
Registered: Jul 2003
Location: NC
Posts: 17
Rep:
|
upgrading java on red hat 9
I'm sort of new to linux and am having problem with java.
I just installed Red Hat 9. It came with java1.3.1 I think. I wanted to upgrade this so I downloaded 1.4.1_03. I just downloaded the jre, not the sdk. I followed some HOW-TO's to install it.
It was all installed into /usr/java/j2re1.4.1_03/
When I did java -version I still got the 1.3.1.
So i noticed there was a /java directory on the root and I turned the /java directory into the j2re1.4.1_03 directory. So now the /java directory has the same structure as the j2re1.4.1_03 directory. This did not help my version. However, when I called the whole path it was the right version, ie /java/bin/java -version it came up correctly with version 1.4.1. So I continued looking.
I also set my environment variables by creating /etc/profile.d/java.sh
This file contains
export JAVA_HOME=/java/bin
export CATALINA_HOME=/opt/tomcat
export PATH=$PATH:/java/bin
export PATH=$PATH:/java/lib/i386
export LD_LIBRARY_PATH=/java/lib/i386
I found that /usr/bin/java -version was 1.3.1. This was the only place I found 1.3.1 instead of 1.4.1. I thought it would be a good idea to
cp /java/bin/java /usr/bin/java and overide the current java in the /usr/bin so that when I went /usr/bin/java -version I would get 1.4.1
The result was not that at all. Instead I got errors "can't find libjava.so" "can't find java 2 runtime environment".
I've been trying to fix this problem for about a day now. I uninstalled the 1.4.1 package and put back on 1.3.1_08 and recopied the /usr/bin/java file with the 1.3.1_08 version. This got rid of the error "can't find java 2 runtime environment". I still have "can't find libjava.so" error. I've looked online and have found no comprehensive solutions.
I think the following solutions would be most helpful to me.
1) Help me fix this problem and end witth the 1.4.1 package or
2) Tell me how I can just get it back to how it was when I installed red hat 9 and I can start over trying to install 1.4.1 cleanly.
|
|
|
|
07-01-2003, 10:27 PM
|
#2
|
|
Member
Registered: Nov 2002
Location: Nashville
Distribution: FreeBSD, Linux, OS-X
Posts: 544
Rep:
|
In your .bash_profile file in your home directory add a line at the end like:
export PATH=/usr/java/j2re1.4.1_03/:$PATH
This will cause linux to find Sun's 1.4.1 jre before the 1.3.1
HTH
Cheers--
Charles
|
|
|
|
07-01-2003, 10:36 PM
|
#3
|
|
Guru
Registered: Jan 2002
Posts: 6,042
Rep: 
|
Try running one of the rpm removal programs and remove java 1.3.1. Then install java 1.4.1_0.
You can have both versions installed but rename java in /usr/bin to java-1.3. You may have to delete java if its an symbolic link. Then make a symbolic from java 1.4.1 directory to /usr/bin.
|
|
|
|
07-02-2003, 12:35 AM
|
#4
|
|
LQ Newbie
Registered: Jul 2003
Location: NC
Posts: 17
Original Poster
Rep:
|
Thanks for the responses. Sadly they have not worked.
I edited my .bash_profile file. Created symbolic links like
ln -sdv /usr/java/j2re1.4.1_03/ /usr/bin/
ln -sdv /usr/java/j2re1.4.1_03/bin/ /usr/bin/
ln -sdv /usr/java/j2re1.4.1_03/lib/i386/ /usr/bin/
I still get "can not find libjava.so" as an error. This error started after I copied the java command from the java1.4.1_03 installation to overide the java command in the /usr/bin directory. So I'm pretty sure it has to do with the java command in the /usr/bin directory. Any thoughts or suggestions?
|
|
|
|
07-02-2003, 07:13 AM
|
#5
|
|
Member
Registered: Nov 2002
Location: Nashville
Distribution: FreeBSD, Linux, OS-X
Posts: 544
Rep:
|
I do not think you need the symbolic links. Just have the new java directories searched in your path *before* the old java directories. That's all I did, and I have both.
Cheers--
Charles
|
|
|
|
07-02-2003, 09:28 AM
|
#6
|
|
LQ Newbie
Registered: Jul 2003
Location: NC
Posts: 17
Original Poster
Rep:
|
Is there a way I can use my red hat 9 installations disks to just put the version of java that came installed with it back on and start over. This was my first task as a linux user so I didn't know what I was doing yet, but I think that with all your help and stuff I've read that I could upgrade to 1.4.1 a lot easier now. So if you know a way that I could reinstall the version of java on my installation disk and sort of undo everything I've done so far without reinstalling the whole distro, that would be helpful. Thanks for all your help so far by the way.
|
|
|
|
07-07-2003, 01:47 PM
|
#7
|
|
LQ Newbie
Registered: Jul 2003
Location: NC
Posts: 17
Original Poster
Rep:
|
thank you cnjohnson. i reinstalled linux and used your advise and it worked wonderfully.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:03 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|