title: How to run Java applets in browser (with CMD)
body: <p>I know, no one uses applets now, but My Undergrad degree still have this in the syllabus!! </p>
  
  <p>This is my <code>HelloWorld.java</code> file code</p>
  
  <pre><code>import java.applet.Applet;
  import java.awt.Graphics;
  
  public class HelloWorld extends Applet {
      public void paint(Graphics g) {
          g.drawString("Hello world!", 50, 25);
      }
  }
  </code></pre>
  
  <p>This is my <code>Hello.html</code> file code</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;html&gt;
      &lt;body&gt;
          Here is the output of my program:
          &lt;applet code="HelloWorld.class" width="150" height="25"&gt;&lt;/applet&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Both the files are saved to desktop. </p>
  
  <p>This is what I did:</p>
  
  <ol>
  <li>Open CMD</li>
  <li>Type <code>cd desktop</code></li>
  <li>Type <code>javac HelloWorld.java</code></li>
  <li>Open Hello.html file in Chrome, Opera, Firefox, Microsoft Edge</li>
  </ol>
  
  <p>None of the browser runs the applet!!  Normal Java (AWT) programs are running using CMD but not applet.</p>
  
  <p>JDK &amp; JRE version I am using is jdk1.8.0_201 &amp; jre1.8.0_201 respectively.</p>