Wednesday, March 14, 2007

Getting Java 6 to be default JVM on Ubuntu Linux

After installing Java 6 using the Sun shell script installer, I wanted to set the default Java installation to the new Java 6 installation that I just installed. This is how you do it:





sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.6.0/bin/javac 30

sudo update-alternatives --install /usr/bin/javac java /usr/lib/jvm/jdk1.6.0/bin/java 30

sudo update-alternatives --install /usr/lib/firefox/plugins/libjavaplugin.so firefox-javaplugin.so /usr/lib/jvm/jdk1.6.0/jre/plugin/i386/ns7/libjavaplugin_oji.so 30



sudo update-alternatives --config javac #then choose javac6

sudo update-alternatives --config java #choose java6

sudo update-alternatives --config firefox-javaplugin.so #choose java6 firefox-javaplugin.so





Found this ditty here.





powered by performancing firefox

2 comments: