开发者

Eclipse not building project

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 开发者_StackOverflowto find java class.

I tried cleaning and it didn't work.

Any help would be greatly appreciated.


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.


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..


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.


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.


Go to View menu (in project explorer right top corner) ----> Customize veiw ----> Uncheck "java output folder".


I had this issue and here is what I did:

  1. Deleted the project from eclipse. Deleted the .settings, .classpath and .project file from the project folder.
  2. Imported the project to eclipse - Import -> General -> Projects from Folder or Archive -> Directory -> {path of project}.
  3. Built the project - Right click the project -> Build Project.
  4. Clean and run

Hope this helps someone!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜