How to import org.apache.commons.net.ftp.FTPClient

Roger picture Roger · Nov 26, 2011 · Viewed 42.8k times · Source

In Eclipse, the following import...

import org.apache.commons.net.ftp.FTPClient;

...produces the following error message...

The import org.apache cannot be resolved

I do not know how to import, nor where to download the import (if necessary). I might need a click-by-click set of Eclipse directions to resolve this.

Answer

Siva Charan picture Siva Charan · Nov 26, 2011

Steps:-

  1. Download this commons-net.jar file

  2. Extract the zip file

  3. Copy the Jar file

  4. Place the file in lib folder of your project.

  5. Right click on the project

  6. On left side of list, click on "Java Build Path"

  7. Click on Libraries tab and Click on "Add Jar"

  8. Browse the Commons-net.jar file and click on insert