title: Java (Android) - class not found exception
body: <p>I'm trying to do some simple FTP stuff in Android.  After researching a little bit, I decided to go with the <a href="http://commons.apache.org/net/" rel="nofollow">apache-commons-net</a>.  Here are the steps I took to get it working under Eclipse.</p>
  
  <ol>
  <li>Downloaded the package <a href="http://commons.apache.org/net/download_net.cgi" rel="nofollow">from here</a> and unpacked it locally.</li>
  <li>In Eclipse, to add this new library, I go to <strong>(Window >) Preferences > Java > Build Path > User Libraries</strong>, click <strong>New</strong>, name it <code>apache-commons-net</code>, then <strong>Add JARs...</strong> to it by picking the <em>.jar</em> files that came in the download.</li>
  <li>For each <em>.jar</em>, I add in the <strong>Source attachment</strong> as <a href="http://www.java-forums.org/new-java/10601-how-make-apache-commons-stringutils-etc-work-eclipse.html" rel="nofollow">described here.</a></li>
  <li>Once this is done, I right-click my project and choose <strong>Properties > Java Build Path > Libraries</strong>, click <strong>Add Library... > User Library > (Next >) choose <code>apache-commons-net</code> > Finish</strong>.  The library then shows up alongside <code>Android 2.2</code> in the <strong>Libraries</strong> tab.</li>
  </ol>
  
  <p>I start programming, and code completion works fine for the classes/methods/etc. from this library.  Import statements are included, etc.  Everything seems to work as it should.  The problem is, when I run the app, it force closes and my LogCat in Eclipse shows the following error:</p>
  
  <blockquote>
    <p>Could not find class 'org.apache.commons.net.ftp.FTPClient', referenced from method &lt;...><br/>
    ...<br/>
    Caused by: java.lang.NoClassDefFoundError: org.apache.commons.net.ftp.FTPClient</p>
  </blockquote>
  
  <p>It seems like I've set everything up correctly, so why is the execution complaining that it can't find the class???</p>
  
  <p>Any ideas or help is greatly appreciated.</p>
  
  <ul>
  <li>Ian</li>
  </ul>