For details about how to configure path and classpath for java environment variables, pathclasspath
At that time, I was only concerned about how to do this when I first started learning java. Now I will go back and look at the problem and start with the environment variable configuration!
Why configure path:
When you enter a command in the cmd command, first search for the command file in the current file directory, and find the command file in sequence in the environment variables of path, whichever is found first, because the path is configured, therefore, you can directly enter jdk commands such as java and javac under the cmd command.
Why configure classpath:
If classpath is not set when jvm searches for class files, it searches for the class files in the current path. After classpth is set, it only searches for class files in the classpath path.
For beginners and cainiao.