The role of 1.path
Path is used to specify the full path of the Java executable file, but you can execute the Java file even if you do not set the path of the JDK in path, but you must write down the full path, such as D:\Program Files\java\jdk1.6.0_10\bin\javac Test.java, if you set the environment variable path, such as: Path=d:\program Files\java\jdk1.6.0_10\bin, when the Java command is executed, the operating system will automatically go to the path to find the executable program, greatly convenient to write.
The role of 2.classpath
Classpath is used to specify where class files are being tried in the program, and when a class is introduced, the Java compiler will go to the path specified by Classpath. Classpath in the "." Represents the current path. In addition, you can set temporary Classpath:set classpath= ....
Dark Horse programmer--java Environment variables path and CLASSPATH