wawanopoulos
wawanopoulos

Reputation: 9794

Eclipse : The import org.apache cannot be resolved

I have a problem to compile a project with import of apache.

Here is the error :

enter image description here

And here is my import :

enter image description here

Upvotes: 3

Views: 40426

Answers (2)

RickInLosAngeles
RickInLosAngeles

Reputation: 189

I am using a POM file to handle dependencies. Therefore adding jar files to class path manually was not an option.

After doing a lot of research, found out that the java project was not a maven project. To mavenize project in eclipse the following was done as noted here:

  1. right click on Java Project
  2. click Configure and select "Convert to Maven Project"

This added maven dependancies automatically to the project and the error "The import org.apache cannot be resolved" went away.

Upvotes: 1

Sanjeev
Sanjeev

Reputation: 9946

Currently you have included log4j-1.2.17.zip in your build Path. You need to extract this zip file and get the log4j-1.2.17.jar and add that to your class path. It will work.

Upvotes: 3

Related Questions