Results 1 to 3 of 3
I installed JDK6 using an .rpm file from Sun's website. I need to have versions 1.6 of both java and javac to install another program for my work. However, I ...
- 07-08-2009 #1Just Joined!
- Join Date
- Jul 2009
- Posts
- 1
Upgrading to JDK6 with .rpm file in RHEL5
I installed JDK6 using an .rpm file from Sun's website. I need to have versions 1.6 of both java and javac to install another program for my work. However, I can't seem to overwrite the old version of java that I had before installing the .rpm file. I tired to upgrade by typing
But every time I type "java -version", it still says I have the old version (1.4.2).Code:sudo rpm -Uvh jdk-6u14-linux-i586.rpm
Does anyone know how I can fix this? I'm srsly a n00b at this stuff so I have no idea what I'm doing. Thanks!
- 07-08-2009 #2
use F option to freshen the verison
i.e rpm -Fvh jdk-6u14-linux-i586.rpmOnly if I could understand the man pages
Registered Linux user #492640
OS: RHEL4,5 ,RH 9,Ubuntu
- 07-09-2009 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,970
The Java packaging is designed so that you can have more that one version installed on your system at any time. The programs java, javac, et al in /usr/bin are actually links (or should be links) to /usr/java/default/bin/... /usr/java/default is a link to one of the actual java versions in /usr/java, such as /usr/java/jdk1.6.0_07. You can fix this by going to /usr/java and changing the link "default" to the version you want as the default. Then /usr/bin/java, /usr/bin/javac, etc will now find the correct version. Alternatively, you can prepend /usr/java/version/bin to your PATH environment variable so it finds the program there first, which is suitable for systems where you have applications that are dependent upon the previous version.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote