2010-06-10

How to put real java on your Linux machine

Fedora Systems

This set of commands will get rid of the stupid gcj java that is packaged with Fedora and other Linux distros and replace it with the real java from Oracle.

alternatives --config java
alternatives --remove java /usr/lib/jvm/jre-1.4.2-gcj/bin/java
alternatives --install /usr/bin/java java /usr/java/latest/bin/java 1
alternatives --config javac
alternatives --remove javac /usr/lib/jvm/java-1.4.2-gcj/bin/javac
alternatives --install /usr/bin/javac javac /usr/java/latest/bin/javac 1

Ubuntu

update-java-alternatives -l
update-java-alternatives -s java-6-sun

1 comment:

Warwick Hunter said...

The Ubuntu tips here are no longer correct.