Summarize: Problem Reason: The package path error pointed to in Classpath in the project Workaround: In the BuildPath CONFIG "", the package with the Red Cross in the liberaies is the wrong path. Modify the current path of the corresponding package into classpath. Then go back to Eclipse and F5 refresh the project. The following two paragraphs refer to the resources that I find on the Internet when I resolve this issue: You create a new Web project with MyEclipse, a. Classpath profile is generated under the project catalog, Inside is the configuration of the jar referenced in your project. this. Classpath has no effect on your Web project. In fact, it is for myeclipse recognition. That's what you're talking about because. classpath file inside The configuration references a jar, but in fact your Lib does not have the jar so there is a red hint. You don't have to take. classpath file and your jar one by one, you open the MyEclipse now. Right-click your Web project and find the build Path > Configure build paht ... > Then there are several tabs above to find Libraries. What you see here is the quote from your project. All jars, see if there's a small yellow exclamation mark on a jar icon? If there is something wrong, select the jar first, click on the right of the Remove > click OK Wait a few seconds, now the Web project above the Red xx is not no, haha. Explain: The jar of the yellow exclamation point, which indicates that the. Classpath configuration file references the jar, But in fact Lib does not have this jar inside. Each person in the group does not have the same direction, because there is no configuration svn and so on, when the integration needs copy project, then the idea is very naïve, directly in eclipse in the import project, can always appear on the project a red exclamation mark do not know why, Look at the package in the class also did not error, sometimes can run normally, but yesterday found a lot of errors: a run on the tip can not find a class, but see Web-inf under the Lib, there is clearly, why can't find it? Check for a long time, is not find the reason, later from a post found the idea of finding the wrong: see Eclipse markers This window, is really a good thing ah! This is generally a classpath problem, because in my own development environment, my LIB library is my own user library, referencing my own class, but when others import into their eclipse, Eclipse views the configuration of the. classpath file and discovers that there is no need for the class library, of course there is a problem. This also reminds yourself that the package referenced in the project's build path is best not to be a standalone user library, but should refer directly to the class library in Web-inf/lib for ease of publication, and path problems are not easy to come by. This is MyEclipse's verification function right-click on the project->myeclipse->remove all Validation markers it's ready.
|