You can learn java using many different tools, GUI's, and also from the command line viewing output in the command window or as an applet that opens with a web browser. (LINK) 
Encountering problem when you many versions of Java are loaded. see the images below. In this workstation both settings worked fine.
  • set classpath=C:\Program Files\Java\jdk1.5.0_06\bin
  • set classpath=C:\j2sdk1.4.2_07\bin

java 1.5 was loaded


I also loaded Sun creator in the same machine.


This problem occured, after installing at&t digital modem/router(2wire, that also installed java.exe in 2wire folder) that caused a problem in that particular workstation. The environment setting had "C:\Java\jdk1.6.0\bin" in the path. The problem only resolved by directing the current folder where java codes were compiled
  • C:\myjava>set classpath=c:\myjava
  • C:\myjava\operators>set classpath=c:\myjava\operators