Eclipse not building project
Solution 1
Views like Package Explorer and Project Explorer, filter out compiler output directories as they are just noise most of the time. If you need to browse the project directory exactly as it is on the file system, you should open the Navigator view.
The issue with Tomcat is unrelated.
Solution 2
Check that the Project is built properly.
Go to project properties ,select Java Build Path and select Source tab in that.
In Source tab make sure that the path for Default output folder is correct.
As the project will be deployed in Tomcat server .Check the classes are properly in the
required locations by exporting WAR file.
If the problem persists , close the project and open it again so that the eclipse settings
are loaded properly.
Hope all these things help you.
Solution 3
I have had the same problem and found the solution:
I had two projects in my workspace, one was building on code change and one did not.
The solution for me was:
When I entered project -> properties -> builders, one project was missing the 'Java Builder'.
So I have manually edited the .project file and added:
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
Reload the project and now all is working well!
Hope this help..
Solution 4
Go in "java Build path" and check Libraries Tab. is there any jar file showing error symbol(jar file path is missing) then delete that jar and add again. this is one of the reason if eclipse is not building class file.
st_sarc
Updated on October 30, 2020Comments
-
st_sarc over 3 years
I am using Eclipse and I've set the output folder to
WebContent/WEB-INF/classes
. The default wasbuild/classes
.When I try to build the classes, nothing shows up. Nothing happens.
When I check the directory in the explorer, the class files are generated. But they are not shown in Eclipse.
I am using
tomcat
to run the Java app. I get an error:Unable to find java class.
I tried cleaning and it didn't work.
Any help would be greatly appreciated.
-
st_sarc almost 13 yearsThe Default output folder is correct. Closed and opened Eclipse again. Didn't work. The classes aren't generating still.
-
st_sarc almost 13 yearsThank you. It shows in the navigator view. :) Any idea why isn't tomcat able to find the classes?
-
Sumanth Varada over 6 yearsThanks a lot @Srikanth Venkatesh, I have a same problem with my Default output folder which was pointed to bin.