Java virtual machine (JVM java VM) Find the Order of class files
1. If The classpath environment variableis not configured, and theJVM only looks for the class file to run under the current directory .
2. if the classpath Environmentis configured, theJVM will first be in the classpath environment variable value directory to find the class file to run.
3.at the end of the classpath environment variable value, If you add a semicolon , the JVM is classpath The class file to be specified is not found in the directory and will be looked up once in the current directory.
4.classpath The end of the environment variable value if there is no semicolon, then the JVM is classpath The class file to be specified is not found in the directory and will not be looked up in the current directory, even if it is present in the directory.
Recommendation: When configuring the classpath environment variable, do not add a semicolon at the end of the value ( No more files are found ) If you need access to the current directory you can use the ". "said.
The order in which the JVM looks for class files