MyEclipse deployed under Tomcat without a class file

Source: Internet
Author: User

Today, encounter a strange thing, in the myeclipse of a new project, after the result of saving, and then view the web-inf/classes/, unexpectedly inside is empty, and output path also set a good ah, strange, so Google a bit, found that there are many people with this problem, One of the summary of the more detailed, specific as follows:

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

2. If selected, also does not work, use this recruit: Project->clean. -> Select 2nd Clean Select project, hook up start build immediatelly

3. Delete the current project, set up the compile file output path in advance, re-import the source file, set Eclipse to compile when saving, and then compile it automatically when you save it.

4. If the project leads to some unused jar bag, and the bag is deleted by you, there will be no error, but how can not compile the class file situation, you can remove all the packages, and then one after the introduction (need), not all of a sudden put all the bags are introduced, useless may cause undesirable consequences.

5. Want to delete a class file regeneration, remove the class file, but the Classes directory folder is opened by other programs, such as Total commander. At this point, the compilation will not pass, under problems may prompt "con" t delete classes ... ". Turn off other programs and recompile.

6. There is also the case that the JRE System Library is removed and can be compiled by re-import. But what causes it is not clear.

7. Remove all the packages from the build path. Then add Jars,add libraries the need to add in, incredibly began to compile ...

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.

9. Then the most important to see whether the project below the work directory, because the CVS control does not add work version, so checkout after this directory, to hand-add some of the project can be automatically compiled

Above 9 (http://www.diybl.com/course/4_webprogram/jsp/jsp_js/20090304/157796.html)

Although summed up very well, but after I tried, found that still can not solve my problem, finally found that the original system is the problem of time, the time to adjust to OK ...

MyEclipse solutions that cannot be automatically compiled
Keywords: myeclipse solutions that cannot be automatically compiled

Today, the SVN version control tool updates the project from the server, selects all updates, because the development tools are myeclipse, so some myeclipse configuration files are also down from the server, overwriting the local profile. Causes the project to not be automatically compiled, MyEclipse does not recognize the item, and the delete re-import project remains invalid. It's been a long day. It was finally solved by my boss.

Summary of questions:

1. The project structure of the re-import is different from the original

SRC packages and so on are different from the original, open the project home directory, there is a. classpath file, with Notepad opened will find a line of <classpathentry kind= "src" path= "src"/&GT; it means your source file location. To see if there is no such line, no need to make up, the following is the import path for some jar packages, such as:

These two lines should also be myeclipse automatically generated, Java running environment \j2ee1.4

<classpathentry kind= "Con" path= "Org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind= "Con" path= "Com.genuitec.eclipse.j2eedt.core.J2EE14_CONTAINER"/>

Imported JAR Package Location
<classpathentry kind= "Lib" path= "Web/web-inf/lib/acegi-security-1.0.0-rc1.jar"/>

2. Refresh the item does not compile automatically, delete the bytecode file in the Classes folder below Web-inf and no longer regenerate

This problem is encountered to check if there is a line

<classpathentry kind= "Output" path= "Web/web-inf/classes"/>

This is to specify the output of bytecode files to where, if not specified will not be the default for you to find a place to save.

3. The above two steps have been completed, but the project still can't run

This time you need to use the MyEclipse project cleanup function, there is a clean in project in the menu bar, it will force clear those configuration files, rebuild will be correct.

The project ran, remember to make a note, later encountered a problem with a reference. The explanation may not be correct, but the problem has indeed been solved.

About MyEclipse cannot be compiled automatically

2009-06-19 16:27

Method One:

Sometimes the content is modified in the MyEclipse, but it does not compile automatically, resulting in the modification not reaching the results we want.

Since it is automatically compiled by default, it is not compiled, it is compiled manually.

The method is as follows:

On the MyEclipse toolbar, find the project----> put the default tick build automatically (automatically compiled, stating that MyEclipse is automatically compiled by default), remove the hook from it, and then locate the project----> Build all, manually compile and then put the automatically on. Let it be automatically compiled again by default.

Method Two:

If it is a tomcat server. Remove the work directory. Clear the cache, remove items, re-import, recompile

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.