title: java.lang.ClassNotFoundException: edu.umd.cs.findbugs.FindBugs2
body: <p>Getting following exceptions while running findbugs in ant task.<br>
  I have findbugs jar of 0.7 version and jsr305 jar of 1.3.8 version in my findbugs home. Let me know if i am missing anything<br>
  findbugs:  </p>
  
  <blockquote>
    <p>[findbugs] Executing findbugs from ant task<br>
     [findbugs] Running FindBugs...<br>
     [findbugs] java.lang.NoClassDefFoundError: edu/umd/cs/findbugs/FindBugs2<br>
     [findbugs] Caused by: java.lang.ClassNotFoundException: edu.umd.cs.findbugs.FindBugs2<br>
     [findbugs]     at java.net.URLClassLoader$1.run(Unknown Source)<br>
     [findbugs]     at java.security.AccessController.doPrivileged(Native Method)<br>
     [findbugs]     at java.net.URLClassLoader.findClass(Unknown Source)<br>
     [findbugs]     at java.lang.ClassLoader.loadClass(Unknown Source)<br>
     [findbugs]     at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)<br>
     [findbugs]     at java.lang.ClassLoader.loadClass(Unknown Source)<br>
     [findbugs] Could not find the main class: edu.umd.cs.findbugs.FindBugs2. Program will exit.<br>
     [findbugs] Exception in thread "main"<br>
     [findbugs] Output saved to findbugs.xml   </p>
  </blockquote>
  
  <pre><code>&lt;property name="build" value="C:\.hudson\jobs\project\workspace\child\classes" /&gt;
  &lt;taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask"/&gt; 
  &lt;target name="findbugs" &gt;
      &lt;findbugs home="C:\apache-ant-1.7.1\lib\findbugsant" 
                output="xml" 
                outputFile="findbugs.xml"&gt; 
          &lt;sourcePath path="C:\.hudson\jobs\project\workspace"/&gt; 
          &lt;class location="${build}" /&gt; 
      &lt;/findbugs&gt; 
  &lt;/target&gt;
  </code></pre>