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

In Eclipse, the next import ...

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

... displays the following error message ...

 The import org.apache cannot be resolved 

I do not know how to import and where to download the import (if necessary). I may need a set of clicks on Eclipse to solve this problem.

+6
source share
3 answers

Steps: -

  • Download this commons-net.jar file

  • Extract zip file

  • Copy the jar file

  • Put the file in the lib folder of your project.

  • Right click on the project

  • On the left side of the list, click "Java Build Path"

  • Go to the Libraries tab and click "Add Jar"

  • Browse the Commons-net.jar file and click on the tab

+12
source

Here's the official Apache download site for Commons Net .

Once you have selected and extracted the appropriate version, install the dependency in the Eclipse project:

  • Right-click the project and select "Properties"
  • Select "Java Build Path" from the popup that appears
  • Configure the dependency on the Libraries tab.

The dependency does not have to be local to your project, but it can.

If you need a library related to the project, lower the jar to a suitable location for the project. For project libraries, select "Add Banks" on the "Libraries" tab; For external libraries, select Add External Banks.

+6
source

If you are working in a Maven project, you will need to add commons-net as a dependency

  <dependency> <groupId>commons-net</groupId> <artifactId>commons-net</artifactId> <version>3.6</version> </dependency> 
0
source

Source: https://habr.com/ru/post/1383216/


All Articles