First let's discuss the difference between the Java compiler and a Java IDE or environment. The compiler translates Java source code files (.java) into Java byte-code files (.class). Once compiled, the byte-code can be interpreted by a separate program known as the JVM (Java Virtual Machine).
What an environment or IDE (Integrated Development Environment) does is let you edit, compile, and run from one program — it does the compile and run steps for you. Many/Most also come with an integrated debugger.
There are currently a growing number of Java IDEs. I only know of three Java compilers: Sun's JDK, IBM's JDK, and GNU's gcj. (JDK stands for Java Development Kit.)
All of these compilers are available in one form or another for many platforms (including Windoze and Linux; some even for Mac OS X). I'd stick with the Sun JDK, myself, but it is really up to you. (Note: gcj actually can also produce machine executable code for the machine it is running on. It also may have standards compliance issues as of yet.)
Also note that the current version of the Java language is Java 2 (aka the Java 2 Platform). Don't get this confused with the compiler version (Sun's own JDK is at 6, for instance).
I have used the following Java environments [more or less] successfully on Win98, WinNT, and WinXP.
Linux is a PC flavor of Unix. It is a 'free' OS and comes with a Java compiler (gcj). You can download it as either individual files or CD images (ISO images) which you can burn onto a CD-R (if you have access to a CD-R or CD-RW drive). You can also buy it at many stores (the bookstore on campus, WalMart, etc.). For a fairly up-to-date list of distributions, check out PolishLinux.org
Using Linux requires that you either dual-boot your machine (set it up to boot WinXX and Linux) or dedicate a machine (must be a 386 or greater) to Linux. If any of this scares you or doesn't make sense, just try one of the DOS/WinXX compilers below.
Further resources for Linux can be found at:
The Java compiler on Linux, as I said, is gcj. Here, though, is a script that emulates the JAVA program you use here on campus. Simply save the file as "JAVA" (you can save from your Web browser by holding down while right-clicking the link; one option will be to Save the Link). Then execute:
su -c'cp ./JAVA /usr/local/bin' su -c'chmod a+rx /usr/local/bin/JAVA'
You'll be prompted for your password (each time), but it wants your root password — not that for your own account. After that, you should be able to compile using the same syntax we use here on our HP/UX box.