No, don't get gcj. It is far behind the current version of the Java programming language and it's not the "official" Java compiler. Nobody uses gcj for any serious project.
Originally Posted by ask_
If you want the latest version of Java and you want to have the compiler so that you can compile your own Java programs, then download the JDK (not the JRE) from Oracle: http://www.oracle.com/technetwork/ja...ads/index.html
Download either the Linux i586 package (32-bit) or the Linux x64 (64-bit) package (depending on if you're running 32-bit or 64-bit Ubuntu). Get the .tar.gz version (not the .rpm version). Unpack it with:
and then add the "bin" directory to your PATH. Read the README.
tar xfz jdk-7u1-linux.tar.gz
Oracle's Java Tutorials are the best place to start learning how to use the JDK and learn programming in Java.