Eclipse (with J2EE plugins) will not build class files to output directory

18,322

Solution 1

This usually happens if, project build path is missing some required libraries. Also ensure, build automatically is checked [ Project > Build Automatically ]. Please post if you still face problem

Solution 2

I had the same problem. I had "Build Automatically" checked, and was expecting class file in my project/bin directory but it was empty. What worked for me was unchecking "Build Automatically" in Project menu, Project -> Clean and then do Project -> Build All. Now all .java files were compiled and I checked "Build Automatically" again.

Share:
18,322
Berlin Brown
Author by

Berlin Brown

He is a software developer interested in a variety of different technologies. He has worked with the CDC, Geographic Information Systems (GIS) and now works for a Financial Services firm. You can find him freenode as blbrown and also visit botlist and botnode.com. Berlin can be found in Atlanta, Georgia. See http://twitter.com/#!/berlinbrowndev2 and http://berlinbrowndev.blogspot.com/

Updated on July 19, 2022

Comments

  • Berlin Brown
    Berlin Brown almost 2 years

    I have had this issue with several versions of Eclipse. In some scenarios, Eclipse will not output bytecode class files to the output directory. I will do a build and a clean. I am working with Tomcat server. I stop the server and still Eclipse will not do a build.

    My output directory: project/WebContent/WEB-INF/classes

    Sometimes after doing so many builds and/or restarting my machine, I am able to build again to that directory. Does any know what the problem is?

    Also, what is the best way to create a bug report for this problem.

    Version Info: Galileo Eclipse Java EE IDE for Web Developers. Build id: 20100218-1602

    Also, mvn m2eclipse plugin installed.

  • matbrgz
    matbrgz over 13 years
    Use the "add comment" link under the question (and any comments).
  • smallfire
    smallfire over 13 years
    I see the link under my answer, but not under the question. I must need a higher rep for adding comments to questions.
  • Berlin Brown
    Berlin Brown over 13 years
    Interesting response. I may check that out.
  • Abidi
    Abidi about 13 years
    @Ranta, I am having the same problem, all my source packages are copied over to metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapp‌​s/webapp but without any class files. Any ideas?
  • Ratna Dinakar
    Ratna Dinakar about 13 years
    Check whether your source folder is configured and added to build path and output folders
  • alexander
    alexander about 9 years
    Wow! I faced this problem like 30 mins, saw this post and thought: 'Ah, this can't be true'. I was so wrong! Thank you so much!