title: How do to run java class in command Line (cmd)? (use classpath)
body: <p>I have java class in folder D:\myProjects\new_example:</p>
  
  <pre><code>package new_example;
  
  import com.google.gson.Gson;
  
  class MyClass{
  
      public static void main(String[] args) {
          MyClass myClass = new MyClass();
          Gson gson = new Gson();
          System.out.println(gson.toJson(myClass.getMyDate()));
      } 
      public String getMyDate(){
         return "Hello";
      }
   }
  </code></pre>
  
  <p>How do to run this class in command Line (cmd) from disk D:? (If gson-2.2.4.jar is located: D:\library\gson-2.2.4.jar AND MyClass.java in D:\myProjects\new_example\MyClass.java), use classpath... How do to run it..?</p>