Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding an Existing Folder to Eclipse project (STS)

Tags:

eclipse

I have an error in the Problems window of Eclipse that says....

The project was not built due to "Error deleting resource 'ProjectName/target/classes/log4j.xml' from the workspace tree." .Fix the problem, then try refreshing this project and building it since it may be inconsistent.

enter image description here

The problem I'm having is that the classes/log4j.xml exist on the file system, but I can't import it. When I go to File > Import > General > File System and choose the classes/log4j.xml as the source I get a message saying that "Source is in the heirarchy of the destination" and it doesn't allow me to finish the wizard.

Can't import screenshot

What do I need to do to get the project to recognize

like image 804
Robert Avatar asked Nov 26 '12 16:11

Robert


People also ask

How do I add an existing class in Eclipse?

Ctrl + Space (while highlighting the classname) should do the trick in Eclipse.


1 Answers

Provide the destination folder, see Into folder text field under From directory

Since it's empty, Eclipse thinks that you want to add log4j.xml to the same place

like image 175
Maxim Shoustin Avatar answered Sep 25 '22 01:09

Maxim Shoustin