Saturday, November 10, 2007

Java on Ubuntu

Ubuntu has GCJ installed by default. A different version of Java can be installed using the Synaptic Package Manager. Sun's Java 1.5 and 1.6 are available through the package manager.

The problem is, even after installing Sun's Java, GCJ is the default.

The default version of java can be changed using the update-java-alternatives command.

update-java-alternatives -l will give the list of all installed java packages.
example output:
java-1.5.0-sun 53 /usr/lib/jvm/java-1.5.0-sun
java-gcj 1042 /usr/lib/jvm/java-gcj

update-java-alternatives -s java-1.5.0-sun will set Sun's java as the default.

For some applications like Ant, Tomcat to run, you nee to set the JAVA_HOME environment variable like below
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun

The above export can be put in /etc/bash.bashrc (for all users) or /home/<user>/.bashrc (for a particular user) so that JAVA_HOME is available on logon.

Wednesday, August 08, 2007

A Roundup of Free Operating Systems

By David Chisnall

Whenever people think of a free operating system (if they do), the odds are that they will think of Linux, a clone of UNIX from 1991. They also might think of one or more of the BSDs, UNIX-derivatives dating back to the early ’80s. Let’s face it, though—UNIX is pretty boring. It was great for a PDP-11, and it gets the job done now, but it’s not exactly exciting.
Fortunately, the Free Software community has some much more interesting projects which, even if they might not be as useful, are much more fun.

Complete article is here

(c) Article is provided courtesy of Prentice Hall PTR.