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
- Diablo Caffe JDK 1.6.0-7 at http://www.freebsdfoundation.org/downloads/java.shtml
- jdk-6u3-fcs-src-b05-jrl-24_sep_2007.jar at http://download.java.net/jdk6/6u3/promoted/b05/
- jdk-6u3-fcs-bin-b05-jrl-24_sep_2007.jar at http://download.java.net/jdk6/6u3/promoted/b05/
- jdk-6u3-fcs-mozilla_headers-b05-unix-24_sep_2007.jar at http://download.java.net/jdk6/6u3/promoted/b05/
- tzupdater-1_3_12-2009a.zip at http://java.sun.com/javase/downloads/index.jsp
- bsd-jdk16-patches-4.tar.bz2 at http://www.eyesbeyond.com/freebsddom/java/jdk16.html
3. Place all files at /usr/ports/distfiles
4. Go to the java/jdk directory
5. Compile it
make install clean
6. Check your java