title: How is javac -sourcepath relating to the path of the file specified?
body: <p>I have this java source file</p>
  
  <p><code>C:\crp\dfdf\src\oata\HelloWorld.java</code></p>
  
  <p>I can compile it</p>
  
  <p><code>C:\crp\dfdf&gt;javac -sourcepath c:\crp\dfdf -d build\classes src\oata\HelloWorld.j
  ava</code></p>
  
  <p>into</p>
  
  <p><code>C:\crp\dfdf\build\classes\oata\HelloWorld.class</code></p>
  
  <p>But I notice that (keeping the same directory and keeping the same other parameters as above) then whatever the sourcepath is, it still works</p>
  
  <pre><code>C:\crp\dfdf&gt;javac -sourcepath c:\sdklsdlewrrblahthisdirdoesnotexist -d build\classes src\oata\HelloWorld.java
  
  C:\crp\dfdf&gt;
  </code></pre>
  
  <p>And if I correct the sourcepath (so, back to <code>c:\crp\dfdf\src</code>) but move to a different directory, then it doesn't work</p>
  
  <pre><code>C:\&gt;javac -sourcepath c:\crp\dfdf\src -d build\classes src\oata\HelloWorld.java
  javac: file not found: src\oata\HelloWorld.java
  Usage: javac &lt;options&gt; &lt;source files&gt;
  use -help for a list of possible options
  
  C:\&gt;
  </code></pre>
  
  <p>I thought maybe the path of the file specified appends to the sourcepath, but this doesn't work either</p>
  
  <pre><code>C:\&gt;javac -sourcepath c:\crp\dfdf\src -d build\classes oata\HelloWorld.java
  javac: file not found: oata\HelloWorld.java
  Usage: javac &lt;options&gt; &lt;source files&gt;
  use -help for a list of possible options
  </code></pre>
  
  <p>So i'm having trouble seeing how sourcepath is operating</p>