JAVA Solution MyEclipse not compile the method __java
Source: Internet
Author: User
Often encountered in the development of MyEclipse do not compile the situation, but the resolution of different situations are not the same, today is also encountered this kind of situation, online search, and finally found a good article, it contains a solution to this situation commonly used methods, now issued to share with you. The situation I encountered was solved by the last method: Classpath file, the path inside is incorrect.
MyEclipse does not compile the resolution 1. Make sure the project->build automatically has been selected.
MyEclipse does not compile the resolution 2. If selected, also does not work, use this trick: Project->clean. -> selected the 2nd one.
Clean Select project, hook up start build immediatelly
MyEclipse does not compile the resolution 3. Delete the current item, set up the compile file output path in advance, re-import the source file, set
MyEclipse is compiled for save and can be automatically compiled at save time
MyEclipse does not compile the solution 4. If the project leads to a unused jar bag that you deleted, it will not be reported.
Wrong but how can not compile the class file situation, you can remove all the packages, and then a one of the reintroduced (need
), do not bring all the bags all at once, the useless may cause undesirable consequences.
MyEclipse does not compile the resolution 5. Want to delete a class file to regenerate, remove the class file, but the classes directory
Folder is opened by other programs, such as Total commander. Compilation will not pass at this time, under problems may
Prompt "Con" t delete classes ... ". Turn off other programs and recompile.
MyEclipse does not compile the solution 6. There is a situation where the JRE System Library is removed and can be compiled by re-import. But
What causes it is not clear.
MyEclipse not compile resolution 7. Remove all the packages from the build path. And then add Jars,add libraries
Need to add in, incredibly began to compile ...
MyEclipse does not compile to resolve 8.project->properties->java build PATH->SOURCE->.../WEB-INF/SRC
Output folder do not default, edit let it point to ... /web-inf/classes
Then click the Build project again to automatically compile. My problem is here, I accidentally deleted this compilation directory
MyEclipse does not compile resolution [size=xx-small][/size]9. Then the most important thing is to see if the work directory is missing under the project, because CVS control does not
Work version, so there is no checkout after this directory, to manually add some of the project can be automatically compiled
In the beginning, I only found the first 7 methods, but they did not solve my problem. Accidentally I open
The "Problems" label, found inside said missing work directory, manually plus, and then refresh the project on it.
The last two were found when I wrote this summary. In particular, the Nineth article compares the projects that use CVS for versioning
Use.
. classpath this XML file should be looked at carefully
MyEclipse the solution that does not compile is this, hope to be helpful to you.
Black Hair: My own Solution: the project right-->properties->java build path->source-> expands the XXX/SRC in source folders on the build path-> Select excluded: (None)-> Click on the right side of the edit-> in the exclusion patterns right point add->browse-> Select a file, and then go all the way to determine, this time the project error. Repeat Open, Delete the documents just joined in the excluded, and then make sure that it is ok. Weird ....
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