title: Why do I get this makefile error: make: *** No rule to make target 'makefile'. Stop
body: <p>I am trying to create a jar file using the <strong>make</strong> command on Windows PowerShell. I downloaded <a href="https://chocolatey.org/packages/make" rel="nofollow noreferrer">https://chocolatey.org/packages/make</a> to install the make package onto windows. Here is what my make file looks like:</p>
  <pre><code>        output: Main.class second.class
          jar cvf output.jar Main.class second.class
  
          Main.class: Main.java
          javac Main.java
  
          second.class: second.java
                        javac second.java
  </code></pre>
  <p>I saved the file in notepad as <strong>makefile</strong> and I made sure it didn't have the .txt extension. These are also the two java programs (Main and second), I have in notepad:</p>
  <p>Main:</p>
  <pre><code>public class Main{
     public static void main(String[] args){
         System.out.println(&quot;Hello world!&quot;);
     }
  }
  </code></pre>
  <p>second:</p>
  <pre><code>public class second{
     public static void main(String[] args){
        System.out.println(&quot;Just google it&quot;);
     }
  }
  </code></pre>
  <p>Note: These 3 files, makefile, Main.java, and second.java are all stored in one folder.</p>
  <p>When I open Windows Powershell and went to the folder where these 3 files are located and typed:</p>
  <pre><code>make makefile
  </code></pre>
  <p>I get this error:</p>
  <p><strong>make: *** No rule to make target 'makefile'.  Stop.</strong></p>