My Computer -> Properties -> Advanced -> Environment Variable Add the following environment variable (assuming your Java installation in C: /J2SDK1.4.2_04) Java_Home = C: /J2SDK1.4.2_04
ClassPath =.;% java_home% / jre / lib / rt.jar;% java_home% / lib / Tools.jar; (.; can not be less, because it represents the current path) Path = C: /J2SDK1.4.2_04/bin New open a DOS window, type Java and Javac test