File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Unistall Jdk1.4 in linux machine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Unistall Jdk1.4 in linux machine" Watch "Unistall Jdk1.4 in linux machine" New topic

Unistall Jdk1.4 in linux machine

Chethan Sharma
Ranch Hand

Joined: Mar 22, 2006
Posts: 59
Hi ,
I am using Linux machine(not a GUI).
I have installed jdk1.4 linux version in my system.
now i want to install jdk1.5 linux.I got bin file already from

my quesion is...

can i install jdk1.5 directly in my system?
will it overwrite JavaRuntime Environment to 1.5?
or I need to unistall jre1.4 fist?becoz when i compile any java file
it may giv jre mismatch statement.

Could you please help regarding this problem?

john guthrie
Ranch Hand

Joined: Aug 05, 2002
Posts: 124
you can have multiple jvms on a linux box. all you need to do is to switch the path to point to the one you want to use, e.g. (bash-speak below):

export JAVA2_HOME=/usr/local/jdk1.4.8
export JAVA5_HOME=/usr/local/jdk1.5.0
export PATH=$JAVA5_HOME/bin:$PATH

two things to note:
1) you may have an /etc/ or /etc/profile.d/ that sets up the jvm, so that may be where you want to make the change
2) redhat used to install a fairly old jdk by default in /usr/bin (i say 'used to' because i haven't run RH in a couple of years). so if the above stuff acts funny you can rpm-uninstall the redhat supplied one or just rename any /usr/bin/java, /usr/bin/javac, /usr/bin/jar, /usr/bin/javah etc
I agree. Here's the link:
subject: Unistall Jdk1.4 in linux machine
It's not a secret anymore!