SometimesEclipseOr, when myeclipse is detected, it cannot be automatically compiled. The class file is missing in the web project!
The first possible reason is that your automatic compilation is not enabled: Project-> build automatically;
Second, pay attention to whether there is a Red Cross in your project. When the project reports an error,EclipseIs not automatically compiled. You can check whether there are some class errors or whether the "build path" is complete, especially from the switch sub-debuggingProgramThe path of some imported jar packages is incorrect.
We usually encounter the second one, that is, some packages are available on other machines, but the same path to your machine does not exist. Deleting the package is related to that package, or Add a new package path.
EclipseThe project is not compiled. How to refreshClassesThe directory is empty.
All operations are performed:
Open project> build automatically.
Open the project --> build automatically. In addition, the clean command may compile, and the result may not work. (generally, run the project --> clean… first ..., Then execute build automatically)
EclipseAutomatic compilation is selected by default. Even if you cancel Automatic compilation, you cannot manually build the project.
There are several reasons for this:
1. 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.
2. If you want to delete a class file and regenerate it, after deleting the class fileClassesThe folder in the directory is opened by other programs, such as total commander. At this time, the compilation will not pass. In problems, the system may prompt "Con't delete ".Classes......". Turn off other programs and re-compile them.
3. In other cases, remove the JRE system library and re-import it to compile. However, it is unclear why.
4. The project references other projects, and the referenced project references a non-use jar package.
If Maven is used, you can jump to the project path and execute
MVNEclipse: CleanEclipse:EclipseRecompile the project
The bytecode file generated by myeclipse is compiled only when a file is modified in the project. It is not generated by searching for whether the file exists.