Before you can do any java you must ensure that teh command line programs are working. Open up a command prompt and then enter the following command -
java -version
The above screenshot is a example output. Yours could well differ from this. What you are looking for is if it can find the command. If it says "command not found" then you need to check your PATH env variable.