Not able to run a simple doclet program : package com.sun.javadoc does not exist
<p>I am trying to run a simple doclet program, but I am not able to compile it.</p>

<pre><code>javac -cp /cygdrive/c/Progra~2/Java/jdk1.8.0_65/lib/tools.jar  A.java
</code></pre>

<p>But it throws </p>

<blockquote>
  <p>A.java:1: error: package com.sun.javadoc does not exist import
  com.sun.javadoc.ClassDoc;</p>
</blockquote>

<p>Where A.java is </p>

<pre><code>import com.sun.javadoc.ClassDoc;
public class A {
}
</code></pre>

<p>I referred it from </p>

<p><a href="http://download.java.net/jdk7u2/docs/technotes/guides/javadoc/doclet/overview.html" rel="nofollow noreferrer">http://download.java.net/jdk7u2/docs/technotes/guides/javadoc/doclet/overview.html</a></p>

<p>I know that I am doing a simple mistake but I ma not able to figure it out.
Can anyone please point me out what am I doing wrong</p>