Skip to content

Ubuntu Eclipse and Ant without GCJ

April 8, 2009

Several packages from the Ubuntu repositories install by default gcj (Gnu Java Compiler) which is one of the open source versions of Java. Some of these packages are Eclipse and Ant. But, because many programs do not run correctly using any other java virtual machine other than that of Sun, I want to use the sun-java version.

To do this you have to use the –no-install-recommends option of apt-get, like this:

sudo apt-get –no-install-recommends  install ant

Keep in mind that you might want to install the other recommended packages (in my case, ant-optional and libxerces), like this:

sudo apt-get –no-install-recommends  install ant ant-optional libxerces

Compared to the download and compile from the ant website method, this method has the advantage that updates to the chosen packages are automatically installed along with the other updates for stuff from your repository. Furthermore, the possibilty of conflicts and dependecy problems is reduced.

Note: This tutorial presumes that you instaled your desired Java VM first. I use the Sun Java VM and compiler so I installed the package sun-java6-jdk:

sudo apt-get install sun-java6-jdk

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: