Project with red exclamation mark in front of Eclipse project.
After you right-click the Eclipse Project's bulid path-->configure build Path , in the pop-up window, locate the Libraries tab, and you can see that some jar packages are red forks, This jar package is a jar package that does not find the corresponding file , causing a red exclamation mark in front of the Eclipse project, possibly because of an externally imported item or because some files were deleted, resulting in a red exclamation point. Locate the jar packages that are not in these eclipse projects, delete them, and then re-import the required jars locally.
In a mature Java project, not only the source code, but also the System Runtime Library (JRE), the third-party function extension Library, other works in the workspace, and even the external class files, all of these resources are dependent on this project, and only after being referenced , to be able to compile the project successfully , and build path is used to configure and manage references to these resources .
Imported projects often occur because some of the jar references in the build path library are local resource paths for others, and this reference path does not have a corresponding resource file on your computer. So we like to create a new Lib directory under the Web-inf directory of the Web project to hold the resource jar files we might use. Then build path, get references to these resources, and the project runs properly, at which point the resource reference path is: /lib/(Resource dependent). This can be run in other environments as well.
Suppose I have a project and I use a jar package called hello.jar. I put this jar package in the root directory of my C drive. Then, when I build the path in my project, the reference path Is "C: /hello.jar". When I passed this project
Where does it look for hello.jar when running on other computers? Of course, the path indicates C: /hello.jar ", and I just placed hello.jar in the root directory of the C drive on my computer, which is not on this computer now. So what is the purpose of the lib directory ?
When I copied the project from one computer to another, I also passed the lib directory, and the path to add hello.jar to the project build path was "../lib/hello.jar", so I didn't care about the project You can find the hello.jar package in lib anywhere.
This lib is just a place to store the jar package, so that the project can find it. The lib is just the address name. You can call it ccc, vvv or whatever.
The Eclipse project appears with a red exclamation mark