Linux - SoftwareThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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?
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.