You need to add the directory where java is installed to the PATH environment variable, for the Windows command interpreter to know where to look for the program.