Eclipse saves compilation issues

Source: Internet
Author: User

Eclipse cannot be automatically compiled in the past two days. No matter how you save the changes, the classes directory is empty.

I have found many articles on the Internet, which are summarized as follows:

1. Make sure that the project-> build automatically has been selected.

2. If this option is selected, you can use this method: 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.

5. You want to delete a class file and regenerate it. After deleting the class file, the folder under the classes 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.

6. In other cases, remove the JRE system library and re-import the library to compile. However, it is unclear why.

7. Remove all the packages in build 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 make it point to./WEB-INF/classes
Click the build project again to compile automatically.

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, you need to manually add some projects to automatically compile them.

At the beginning, I found only the first seven methods, but none of them solved my problem. accidentally I opened the "problems" label and found that the "work" directory is missing. Add it manually and refresh the project.

The last two were found when I wrote this Summary. In particular, article 9 is useful for projects that use cvs for version control.

. Classpath this XML file should be carefully read

Article Source: DIY tribe (http://www.diybl.com/course/4_webprogram/jsp/jsp_js/20090304/157796.html)

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: 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.