Josef Zamrzla
Josef Zamrzla

Reputation: 191

Ant FTP task - cannot create type

Could someone help me with Ant? I want to deploy some files through FTP but i still can't due to error:

Could not create type ftp due to java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClientConfig

In ant lib directory I have:

Thanks for any help.

Upvotes: 4

Views: 7709

Answers (3)

Bernd Kohlstedt
Bernd Kohlstedt

Reputation: 101

If you use a Debian Linux distribution or Raspbian on a Raspberry Pi, you can simply solve this problem by running:

sudo apt-get install libcommons-net-java

Upvotes: 1

Tirthankar
Tirthankar

Reputation: 615

In Eclipse:

Window > Preferences > Ant > Runtime > Classpath Tab > Ant Home Entries (Default) > Add External jars

   1.commons-net-2.0.jar

   2.oro-2.0.8.jar

It worked for me :)

Upvotes: 4

oers
oers

Reputation: 18704

I assume that you are using ant 1.8.

You need apache-commons-net-2.0.jar and jakarta-oro-2.0.8.jar in the lib folder as listed in this blogpost and in the docs(Although the doc says 1.4 should be enough)

Upvotes: 7

Related Questions