It's pretty straightforward...
You need to go to
http://java.sun.com/products/?frontpage-main
and download a copy of the Java 2 Standard Edition SDK (Software Development Kit). It includes everything you need, and it's all free.
When youwrite your programs, you'll compile them using the Java Compiler, javac. If you were on windows and you had javac in your path, then you'd just type
c:\> javac c:\path\to\myclass.java
(where c:\path\to\ is the directory where your java source file is stored)
And it would either compile myclass.java or would give you compilation errors that you could then go fix.
If you write your programs in "Pure" Java, then they will run on any machine with a copy of the JVM. That includes most Windows 2000 and Mac 9 machines.
Good luck.
Jay Eckles
www.jayeckles.com