title: ClassNotFoundException in Java Applet
body: <p>I have an extremely basic Java applet that isn't functioning in Safari as an exercise for an old textbook that isn't working. I'm using the legacy Java SDK version 1.6 on OSX El Capitan. The HTML is</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;2-1 Test&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;applet code="HelloWorld.class"&gt;&lt;/applet&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And the Java program is:</p>
  
  <pre><code>import java.awt.*;
  import java.applet.*;
  
  public class HelloWorld extends java.applet.Applet{
  TextField m1, m2, m3;
  public void main(){
  m1 = new TextField(60);
  m2 = new TextField(60);
  m3 = new TextField(60);
  m1.setText("Good day to you!");
  m2.setText("My name is Cynthia.");
  m3.setText("This is the third line.");
  add(m1);
  add(m2);
  add(m3);
  }
  }
  </code></pre>
  
  <p>HTML and Java file (compiled to HelloWorld.class) are in the same directory (no packages are involved).</p>
  
  <p>UPDATE: Spaces have been removed from the filepath. The Java console now came up with the following:</p>
  
  <pre><code>basic: tap installed
  basic: Creating PluginEmbeddedFrame served by PlaceHolderServerName-2581
  basic: Done creating PluginEmbeddedFrame
  basic: Added progress listener: sun.plugin.util.ProgressMonitorAdapter@7e29e923
  security: Expected Main URL: file:/Users/Desktop/GreatIdeasInComputerScienceWithJavaExercises/HelloWorld.class
  java.lang.ClassNotFoundException: HelloWorld.class
      at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:745)
  basic: load: class HelloWorld.class not found.
  java.lang.ClassNotFoundException: HelloWorld.class
      at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Thread.java:745)
  security: Accessing keys and certificate in Mozilla user profile: null
  security: Reset deny session certificate store
  security: Reset deny session certificate store
  basic: Removed progress listener: sun.plugin.util.ProgressMonitorAdapter@7e29e923
  basic: Dialog type is not candidate for embedding
  basic: Dialog type is not candidate for embedding
  </code></pre>
  
  <p>Can anyone suggest what I would need to do to get Java set up properly so I can continue with the book?</p>