title: Javadoc: error - Cannot find doclet class
body: <p>I'm trying to run Javadoc with a custom doclet from windows command line:</p>
  
  <pre><code>javadoc -classpath C:\path\to\build\dir -sourcepath C:\path\to\src\dir -doclet somePackageName.customDocletClassFileName anotherPackageName
  </code></pre>
  
  <p>"anotherPackageName" is the package directly under given sourcepath for which I want to produce documentation.</p>
  
  <p>When I execute it like this I get the error:</p>
  
  <pre><code>javadoc: error - Cannot find doclet class somePackageName.customDocletClassFileName 
  </code></pre>
  
  <p>It seems like there is something wrong with the -classpath flag, any ideas?</p>
  
  <p>If I substitute</p>
  
  <pre><code>-doclet somePackageName.customDocletClassFileName
  </code></pre>
  
  <p>to</p>
  
  <pre><code>-docletpath somePackageName
  </code></pre>
  
  <p>it works better (although I cannot really verify the output since I have not added the testng jar to the classpath and then there's a lot of other issues).</p>