Classpath: What is the difference between classpath * And classpath?
Classpath is essentially the root path of jvm. resources obtained by jvm are all found under this root path. Note that this root path is a logical path rather than a disk path. For example, the paths of the two jar packages are/a. jar and/B. jar, but the resources in these two jar packages can be found using classpath.
Generally, the classpath points to the classes, that is, the root path of the compilation path. Generally, these files are stored in the classes:
1. The class file compiled by the java file.
2. properties configuration file.
3. xml configuration file.
4. Some template files, such as *. ftl.
5. other files that need to be obtained using classpath.
After understanding what is put in the classpath pointing to, let's take a look at the difference between classpath: And classpath.
1. classpath: only find the file in your classes path.
2. classpath *: not only the classes path, but also the classes path in the jar file.
Refer:
- The difference between classpath * And classpath when Spring loads resources http://blog.163.com/ygplpr@126/blog/static/389691162012116102750608/
- Method http://blog.csdn.net/kkdelta/article/details/5560210 for JAVA to read external resources