Two Laptop Bag
The moose likes Ant, Maven and Other Build Tools and the fly likes NoClassDefFoundError.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "NoClassDefFoundError.." Watch "NoClassDefFoundError.." New topic


Hemalatha Ramasamy

Joined: Sep 12, 2006
Posts: 1
When i try to FTP, i am getting the following error
java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClient
set path=%path%;C:\jdk\jdk13102\bin;P:\apache-ant-1.6.5\bin;
set CLASSPATH=%CLASSPATH%;P:\apache-ant-1.6.5\lib\ant.jar;P:\apache-ant-1.6.5\lib\ant-commons-net.jar;P:\apache-ant-1.6.5\lib\jakarta-oro-2.0.8.jar;P:\apache-ant-1.6.5\lib
set JAVA_HOME=C:\jdk\JDK13102
set ANT_HOME=P:\apache-ant-1.6.5

please let me know what the problem is..
Matt Harrah
Ranch Hand

Joined: Aug 05, 2006
Posts: 54
A really good page to look at is the "library dependancies" page under "optional tasks" in the online docs, which has complete information, but to summarize:

ftp, rexec and telnet tasks all require both jakarta-oro 2.0.1 or later and commons-net in the classpath

Get jakarta-oro here
Get commons-net here
I agree. Here's the link:
subject: NoClassDefFoundError..
It's not a secret anymore!