How to install the Java Developer Tools
MacOS X:, The Java tools come with the developer's package, which will either be on the installation disks, or someplace on your hard drive if your machine arrived with OS X pre-installed. To check you can search for 'Xcode' - if it turns up lots of stuff then you have the java dev kit installed.
Once it is installed, open a terminal window (Applications->Utilities->Terminal) and type 'javac'. If that works (ie, you get a sane response listing some options), then you're golden.
Windows: Go to http://java.sun.com/javase/downloads/ and download the JDK package. Follow the install instructions. A typical install is fine. You can then go to the Start Menu -> Run... and enter 'command' to get a terminal window.
Linux: Under most distros, this should really come pre-installed. If it doesn't, go to the Sun Java website and download the applicable rpm/tar/tgz/etc. Hopefully you are friendly enough with *nix type OSs to be able to unpack the Java SDK and get it into your $path so you can use it. Again, 'javac -v' gives a sane response if everything is up and running as per spec.
FreeBSD: Since you are running FreeBSD, I don't need to make any disparaging comments about your abilities vis-a-vis *nix OSs. CD to your /usr/ports directory, and search for the Linux version of the Java SDK (in /usr/ports, % make search name="java" to narrow it down, probably it is in java-sun-sdk142 or similar). When you make install in that directory, you will be told to download the SDK from the Sun Java website (this is due to Sun's licensing rules). Once you've done that, you can make install again, and Java will be available. Note: Sun Java is not supplied as native for FreeBSD, you will need to run it under Linux emulation. No worries, it is actually faster under Linux emulation than if you were running it on comparable iron directly under Linux. Which is a hoot. If you are feeling your oats, it is also possible to download the JDK source from Sun and compile that to native. It takes about a weekend.