You need whats called a JDK, Thats short for "Java Developer's Kit".
Its often confused with the JRE, Although they're two completely different files, The JRE stands for "Java Runtime Environment" (Included in the JDK). This is needed to RUN the files, not Compile.
You cannot compile anything you make without this. Therefore you HAVE to have this.
You can download the following options (I WILL UPDATE):
Just the JDK 6 UPDATE 16JDK 6 UPDATE 14 W/ JavaFX 1.2 SDKJDK 6 UPDATE 14+NetBeans 6.7 All of these will work.
I recommend the first as its the smallest and I will be supplying my favorite IDE in all my tutorials and i suggest the same for everyone else that are supplying tutorials.
(IDE stands for integrated development environment)
_________________________________
Heres my IDE.
Dr Java