MandrivaThis Forum is for the discussion of Mandriva (Mandrake) Linux.
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.
On Mandriva 2006, trying to install jdk1.5 (used by Tomcat 5.5) with jdk 1.4 already installed. I try to add JAVA_HOME="/usr/java/jdk1.5.0_07" <br> export JAVA_HOME after the export statement in /etc/profile. However, logging out and back in, when I do echo $JAVA_HOME I still get /usr/lib/jdk-1.4.2_09. Any ideas on how to get it to point to the newer one?
I was leaving jdk 1.4 there since some older java programs would need it. Does this have to be removed?
I went into /etc/profile.d directory and marked each java related file (sh and csh) as non-executable. (These were all 1.4.2 based) I then added files:
jdk-1.5.0_07.sh with the following:
export JAVA_HOME=/usr/java/jdk-1.5.0_07
export JDK_HOME=$JAVA_HOME
export PATH="$PATH:$JAVA_HOME/bin"
export MANPATH="$MANPATH:$JAVA_HOME/man"
and jre-1.5.0_07.sh with the following:
if [ -z "$JAVA_HOME" ]; then
export JAVA_HOME=/usr/java/jre-1.5.0_07
export PATH="$PATH:$JAVA_HOME/bin"
fi
and made them executable.
I removed the entries I had put in .etc/profile and logged out and back in.
Now the PATH and JAVA_HOME environment variables look right. Perhaps I should have just deinstalled the jdk(jre)1.4.2 stuff -- I don't know. I haven't yet found anything that doesn't work right. Any good reason to keep the 1.4.2 release, or should I urpme it -- or will that cause me some yet unknown problems?
Surely if you go in as root and edit the bash or whatever shell you use profile ,somewhere the JAVA_HOME variable will be set to 1.4 version initially.
Find that entry and change it to the 1.5 version and bobs your uncle?
The path and others should be automatically changed without interference
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.