0. Because the reference path of a jar package is incorrect, compilation fails.
1. Make sure that the project-> build automatically has been selected.
2. If it is selected,
Use this trick: Project-> clean...-> select 2nd clean select projects and Check Start build immediatelly.
3. Delete the current project, set the output path of the compilation file in advance, re-import the source file, set eclipse to compile when saving, and then compile automatically when saving.
4. if a jar package is introduced in the project and you delete the package, no error will be reported but the class file cannot be compiled, you can delete all packages and then introduce them one by one (required). Do not introduce all packages at once. Useless Packages may cause adverse consequences.
6. Also, remove it.
JRE system library, re-import to compile. However, it is unclear why.
7. Set build
Remove all packages in path. Then add jars and add libraries to add the required ones, and then compile again...
8. Project-> properties-> JAVA
Build path-> source->.../WEB-INF/src Output Folder do not default, Edit to point it to ../WEB-INF/classes
Click build again to automatically compile
9. the most important thing is to check whether the work directory is missing under the project. because the work is not added as a version during CVS control, this directory is unavailable after checkout, manually add some projects to automatically compile.
9 from above (http://www.diybl.com/course/4_webprogram/jsp/jsp_js/20090304/157796.html)
Summary:
1. The re-import project structure is different from the original one.
The SRC package is different from the original one. Open the main directory of the project and there is one. open the classpath file in notepad and you will find a line <classpathentry kind = "src" Path = "src"/>. It means your source file location and check whether this line exists, there is no need to make up. Below are some jar package import paths, such:
// These two lines should also be automatically generated by myeclipse, Java Runtime Environment \ j2ee1.4
<Classpathentry kind = "con" Path = "org. Eclipse. jdt. Launching. jre_container"/>
<Classpathentry kind = "con" Path = "com. genuitec. Eclipse. j2eedt. Core. j2ee14_container"/>
// Import the jar package location
<Classpathentry kind = "library" Path = "Web/WEB-INF/lib/acegi-security-1.0.0-RC1.jar"/>
2. Refresh the project is not automatically compiled, the bytecode file in the classes folder under the WEB-INF will not be regenerated after deletion
If this problem occurs, check whether this line exists.
<Classpathentry kind = "output" Path = "Web/WEB-INF/classes"/>
This specifies the output location of the bytecode file. If this parameter is not specified, you will not find a place to store it by default.
3. The above two steps have been completed, but the project still cannot run.
At this time, you need to use the myeclipse project cleanup function. There is a clean in the project in the menu bar, which will forcibly clear the configuration files, and the new achievements will be correct.
When the project is running, remember to take a note and have a reference when you encounter any problems! The explanation may not be correct, but the problem is fixed!
Myeclipse cannot be automatically compiled
From: http://dengjianqiang200.blog.163.com/blog/static/658119201031612535145/
Method 1:
Sometimes the content is modified in myeclipse, but it is not automatically compiled. As a result, the modified content does not reach the desired result.
Since it is automatically compiled by default, and it is not compiled, it should be compiled manually.
The method is as follows:
On the myeclipse toolbar, find project ----> set the default build automatically (automatically compiled, indicating that myeclipse is automatically compiled by default) and remove it from the check box, find the project ----> build all, manually compile it, And then tick the build automatically. Let it automatically compile by default!