suppose you are using FreeBSD-4.4, and you have a good connection to Internet:
1. login as root.
2. cd /usr/ports/java/jdk
3. make all install clean
This will install the jdk from compilation of source code, which is downloaded automatically from the corresponding web sites. If any other packages are also needed as dependences, they will be downloaded automatically too. This is great, right? not like Linux's RPM, you cannot install anything if dependence error happened with rpm. But if you use do it this way, you need a fast Internet access, and it may take some time to compile the source.
Alternatively, you may try install the binaries:
1. login as root
2. cd /usr/port/java
3. pkg_add -r jdk
This will also need to download the binaries from Internet.
You may also try to install from CD:
1. login as root
2. mount /cdrom
3. cd /packages/all ( I am not sure the exact location of jdk files, you may try "ls" or other cmds to locate it )
4. make all install clean ( you may need to do "configure" before make, look at the README file there