title: How to run Java program through the terminal in IntelliJ
body: <p>I know how to run and compile a basic Java program in the terminal using <code>java</code> and <code>javac</code>.</p>
  
  <p>I also know how to run and compile a Java program using IntelliJ.</p>
  
  <p>However, how do you run a program in an IntelliJ project using the terminal.</p>
  
  <p>So far all my classes is compiled to a "out/production/myproject" folder by default in Intellij. So far I have tried the following command in the above folder:</p>
  
  <pre><code>java Main
  </code></pre>
  
  <p>However for some reason it says: </p>
  
  <pre><code>Error: Could not find or load main class Main
  </code></pre>