About the non-compilation class of eclipse

Source: Internet
Author: User

 

The solution to this problem is summarized as follows:

1. Check whether project --> build automatically is selected? If not, clean it and restart eclipse.

2. check whether there are unnecessary (redundant) jar packages in your Lib, and check whether there is any wrong path in your. classpath file.

3. This is the most important point. check whether there are any error messages about this project in the problems view. This is generally the case:
The project cannot be built until build path errors are resolved

The following message is displayed: unbound classpath. You can delete these paths in. classpath.

Article Source: feino Network (www.firnow.com): http://dev.firnow.com/course/4_webprogram/jsp/jsp_js/200827/99678.html

 

 

======================================

Today, we suddenly found that eclipse does not automatically compile files. Baidu immediately searched for it and followed the instructions on the Internet, but it still did not work.

The following prompt appears in [properties-> JAVA build path] In the right-click menu of the project:

Build path entry is missing:/infotailserver/JS

Then I thought that I accidentally created the wrong folder yesterday and deleted it immediately. Is this the reason? I guess eclipse must be in that file.

This information is recorded. So all files are displayed in the project, and an uncommitted file with an asterisk is displayed:. classpath.

You don't have to ask. Most of them are him. In the second line, the following sentence appears: <classpathentry kind = "src" Path = "JS"/>

The source file is as follows:

<Classpathentry kind = "src" Path = "src"/>
<Classpathentry kind = "src" Path = "JS"/>
<Classpathentry kind = "con" Path = "org. Eclipse. jdt. Launching. jre_container"/>
<Classpathentry kind = "con" Path = "com. genuitec. Eclipse. j2eedt. Core. j2ee14_container"/>
<Classpathentry kind = "lib" Path = "webroot/WEB-INF/lib/oscore-2.2.5.jar"/>
<Classpathentry kind = "lib" Path = "webroot/WEB-INF/lib/infoframe2.jar"/>
<Classpathentry kind = "lib" Path = "webroot/WEB-INF/lib/ojdbc14.jar"/>

...

Then delete and save the second row. Haha, solve the problem!

I guess eclipse reads the file during compilation and finds that the JS Folder does not exist when the second line is executed. Therefore, it throws an exception and does not cause execution.

Cannot be compiled.

The above is a solution that I have encountered that cannot be compiled. I will share it with you.

Article Source: feino Network (www.firnow.com): http://dev.firnow.com/course/3_program/java/javajs/20081011/149966.html

 

 

======================================

 

Summary about the non-compiled eclipse class

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 pjoject selected below, select a project, and click "OK"

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-> webroot/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.

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.