Sun JDK 1.6 on FreeBSD 7.0

Since there is no Sun JDK binaries for FreeBSD, you have to get your hands dirty to install it.

Here are the steps
1. If you don’t have your ports tree, get it.
portsnap fetch extract

2. You need to fetch files manually due to license restrictions.
Download the following files

3. Place all files at /usr/ports/distfiles

4. Go to the java/jdk directory
cd /usr/ports/java/jdk16

5. Compile it
make install clean

6. Check your java
/usr/local/jdk1.6.0/bin/java -version