Myeclipse project cannot be automatically compiled

Source: Internet
Author: User

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.

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: info-contact@alibabacloud.com 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.