It’s just very easy as FreeBSD has a license with Sun Microsystems. Just download the package for your architecture in http://www.freebsdfoundation.org/downloads/java.shtml and proceed as follows:
pkg_add -r javavmwrapper
pkg_add diablo-jre-freebsd6.i318.104.22.168.07.00.tbz (in my case the i386 architecture)
This will install the firefox plugin as well.