With a little side of applesauce...

Thursday, February 1, 2007

Replace Fedora Core 4 default java with sun-java

To remove the default java packages from Fedora Core 4:

rpm -e –nodeps java-1.4.2-gcj-compat-1.4.2.0-40jpp_31rh

Then, we need to download the j2sdk 1.4.2 from sun.com (it is down today for maintenance, so will get a URL later).

Now, we install the j2sdk-1_4_2_*.rpm (download the newest SDK from http://java.sun.com/j2se/1.4.2/download.html, if you haven’t yet):

chmod 755 j2sdk-1_4_2_11-linux-i586-rpm.bin
./j2sdk-1_4_2_11-linux-i586-rpm.bin

Which yields the following:


Do you agree to the above license terms? [yes or no]
yes
Unpacking…
Checksumming…
0
0
Extracting…
UnZipSFX 5.40 of 28 November 1998, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: j2sdk-1_4_2_11-linux-i586.rpm
Done.

Finally:
rpm -i j2sdk-1_4_2_11-linux-i586.rpm

Now, we export the new java_install/bin directory into the $PATH:
export PATH=$PATH:/usr/java/j2sdk1.4.2_11/bin

Or, to maintain the correct PATH environment variable across multiple sessions, modify the PATH line already found in your ~/.bash_profile to look like:
PATH=$PATH:$HOME/bin:/usr/java/j2sdk1.4.2_11/bin

No comments: