Welcome to the forums.
Everything you need to develop Java applications is completely free. To get a compiler, simply go to java.sun.com under J2EE v1.4 Downloads. Further, if you were actually referring to a good Java IDE — that's also free, and available from the aforementioned location. It's called netBeans and it's a fairly decent Java IDE. Other options include JCreator if you're on Windows, or Eclipse regardless of your platform. Both are quite good.