title: java.exe can't seem to find a .java file in the current working directory
body: <p>I installed Java on Windows 10. It installed here: <code>C:\Program Files\Java\jdk-10.0.1</code>.  I made sure the path had been modified to include the <code>bin</code> folder and <code>java.exe</code>. I can type 'java' in a cmd window and get the java usage message. So, that works. </p>
  
  <p>Then I installed Eclipse. I went through the tutorial section walkthru to create the <code>HelloWorld</code> program. And it runs in Eclipse. Here it is:</p>
  
  <pre><code>public class HelloWorld {
  
      public static void main(String[] args) {
          // TODO Auto-generated method stub
          System.out.println("Hello World!");
      }
  
  }
  </code></pre>
  
  <hr>
  
  <p>Now that I have that set up correctly, I wanted to try running it without Eclipse. So, I copied the <code>HelloWorld.java</code> source file from the Eclipse work space to a folder I created under Documents, <code>C:\Users\kris4\Documents\java</code>. </p>
  
  <p>I open a cmd window, cd to <code>C:\Users\kris4\Documents\java</code>, and do a <code>dir</code>:</p>
  
  <pre><code>Volume in drive C has no label.
   Volume Serial Number is A656-1FA0
  
   Directory of C:\Users\kris4\Documents\java
  
  05/24/2018  03:22 PM    &lt;DIR&gt;          .
  05/24/2018  03:22 PM    &lt;DIR&gt;          ..
  05/24/2018  11:20 AM               160 HelloWorld.java
                 1 File(s)            160 bytes
                 2 Dir(s)  116,141,473,792 bytes free
  </code></pre>
  
  <p>There it is...</p>
  
  <p>But, when I execute, <code>java HelloWorld.java</code> I get this:</p>
  
  <pre><code>Error: Could not find or load main class HelloWorld.java
  Caused by: java.lang.ClassNotFoundException: HelloWorld.java
  </code></pre>
  
  <p>The file is right there in the working directory, and the file is a copy of a working Eclipse workspace file. WTH!  Looking on the internet, I thought java needs <code>CLASSPATH</code> to find the source, so I defined a variable <code>CLASSPATH</code> to be the directory <code>HelloWorld.java</code> resides in. Still no luck.</p>
  
  <p>Obviously, being new to this, I'm missing something very basic in the cmdline environment that should be there, but I honestly expected <code>java.exe</code> to look in the current working directory for a file given as an argument, like any other program.</p>
  
  <p>Can one of you folks help me out?</p>