title: How to compile javadoc from sources in simplest way?
body: <p>Suppose I have project directory <code>MyProject</code>, under which I have <code>src</code> directory with sources of the program.</p>
  
  <p>I want to compile all javadocs from there. What is the simplest command to issue?</p>
  
  <p>If I run </p>
  
  <pre><code>javadoc -sourcepath ./src -d ./docs
  </code></pre>
  
  <p>I get an error</p>
  
  <pre><code>javadoc: error - No packages or classes specified.
  </code></pre>
  
  <p>Can't it deduce packages from source files?</p>
  
  <p><strong>EDIT 1</strong></p>
  
  <p>This way also causes an error</p>
  
  <pre><code>...MyProject&gt;javadoc -sourcepath ./src *.java -d ./docs
  Creating destination directory: "./docs\"
  javadoc: error - File not found: "*.java"
  1 error
  </code></pre>