Reputation: 31
I am using Eclipse and I've set the output folder to WebContent/WEB-INF/classes
. The default was build/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.
Upvotes: 2
Views: 24919
Reputation: 77
I had this issue and here is what I did:
Hope this helps someone!
Upvotes: 0
Reputation: 400
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..
Upvotes: 2
Reputation: 11
Go to View menu (in project explorer right top corner) ----> Customize veiw ----> Uncheck "java output folder".
Upvotes: 0
Reputation: 11
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.
Upvotes: 1
Reputation: 2812
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.
Upvotes: 4
Reputation: 29139
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.
Upvotes: 0