The Eclipse project appears with a red exclamation mark

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.