Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 823
Berlin Brown Avatar asked Dec 27 '10 19:12

Berlin Brown


People also ask

Why can't I see my classes in Eclipse project explorer?

There would be the case : if you have opened project explorer in eclipse then it may not show you classes generated under /**/build/classes, in such case open Navigator view of that project and check build directory under the same project. Thanks for contributing an answer to Stack Overflow!

How to solve eclipse load module not found?

I had problem in eclipse for load module not found and no class file was getting created. Solution: Go to Create New Project > Under JRE section Choose Use project Specific JRE. Now Class files are created. Please check if all the jars are there in your build path settings.

Why eclipse cannot build the project for build path error?

Coz Eclipse cannot build the project for Build Path error. Check that your external jar files is not showing any error.

How to create a class file in Eclipse?

I had problem in eclipse for load module not found and no class file was getting created. Solution: Go to Create New Project > Under JRE section Choose Use project Specific JRE. Now Class files are created. Show activity on this post.


2 Answers

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

like image 102
Ratna Dinakar Avatar answered Oct 27 '22 00:10

Ratna Dinakar


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.

like image 23
Vlad Avatar answered Oct 27 '22 01:10

Vlad