CLASSPATH, the current JDK (1.5 later) does not require this environment variable. The original JDK itself cannot find the Tools.jar in the Jdk\lib directory, so this environment variable needs to be configured.
Role: the Java Virtual machine (JVM) loads the classes used by the application with the class loader, and specifically which classes are loaded according to the needs of the time. The CLASSPATH environment variable tells the class loader where to look for classes provided by third parties and user-defined classes. Alternatively, you can use the JVM command-line parameter-classpath to specify the classpath for your application, and the classpath specified in-classpath overrides the value specified in the CLASSPATH environment variable.
The WEB app under Tomcat has two presets for classpath:web-inf/classes and Web-inf/lib startup projects, and the project loads the data in both directories. This is the specification of the war package. To change the classpath of the preset, there is no similar configuration found in the Tomcat configuration file, so you can achieve your classloader.
This makes it easy to understand the configuration of the Classpath in Web. xml
What the hell is classpath java?