The project uses the Classpath path to refer to the file, so what does classpath mean?
I first put the above applicationcontext.xml file in the SRC directory found can.
So classpath in the end is where, on the internet to read a few blog
The Yellow Line section explains the problem I put in the SRC directory to use classpath: Access.
But the red line part, he said this sentence right, I feel a problem.
And then I tried it.
Found either in the Web-inf directory, or under the Web-inf/lib. web-inf/classes file isn't yet .....
Then go to the project workespaces see Bulib/classes (Here is classpath path) found Applicationcontext.xml not in
Click to open the. classpath file under the compiled project found there are four types of kind
. Classpath Content Interpretation
The. Classpath is a dependent file that describes the project:
- The exact location of the source file (kind= "src")
- Operating system environment (kind= "con")
- Specific location information for the project's library (kind= "Lib")
- In each LIB's XML child node, there is additional configuration information about it (for example, the "Javadoc_location" I configured)
- Output Directory of the project (kind= "Output")
In general, this document is the configuration of the entire project operating environment.
We can see that kind is src only "src" and does contain Web-inf folder
Then I saw a blog to solve the problem of Classpath path http://blog.sina.com.cn/s/blog_792701cd0101hpbr.html
Then I added a line to the. classpath
Run successfully!
Go to Workespaces/project name/build/classes/found
Hey! Applicationcontext.xml in.
This can be summed up:
1. In compiling the generated file. The type of kind= "src" in classpath is the classpath path, which can be referenced in the Classpath:xxx way in the project. You can also manually come to add, expand the scope of classpath, <classpathentry kind= "src" path= "XXX"/>
That means you want to know what classpath means. Classpath look at kind= "src".
2, in the compilation generated under the project bulid/classes/files are classpath path files, can be obtained through the classpath: method.
3, "SRC is not classpath, Web-inf/classes,lib is classpath" This sentence is not right , this is to write the project saw, the real classpath is compiled after the bulid/classes/ (as explained in 2)
Classpath Path in Java project