Have you ever programmed in any other language than java? If not, then you will need soem time until you can program such stuff. For a start I would suggest you go to http://java.sun.com
There you will find a lot of stuff about java.
Especially here you will find a good introduction (online or for download):http://java.sun.com/docs/books/tutorial/
You get a basic development kit here:http://java.sun.com/j2se/1.4.1/download.html
(choose the SDK)
Or a more comfortable IDE for popgramming:http://www.eclipse.org/