title: Java applet Error ... What is wrong?
body: <p><strong>Java applet code</strong></p>
  
  <pre><code>package M257Applet
  
  import java.applet.*;
  
  import javax.swing.*;
  
  import java.awt.*;
  
  public class HellowApplet extends JApplet {
  
      public  void init(){
  
          Container cp = getContentPane();
          JLabel lb = new JLabel("Hellowwwww");
          cp.add(lb);
      }
  
  }
  </code></pre>
  
  <p><strong>html file</strong></p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Applet&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;APPLET CODE = HellowApplet.class  WIDTH =  400   HEIGHT = 400 &gt;
  &lt;/APPLET&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>Java Plug-in 1.6.0_22
  Using JRE version 1.6.0_22-b04 Java HotSpot(TM) Client VM
  User home directory = C:\Users\pc
  ----------------------------------------------------
  c:   clear console window
  f:   finalize objects on finalization queue
  g:   garbage collect
  h:   display this help message
  l:   dump classloader list
  m:   print memory usage
  o:   trigger logging
  q:   hide console
  r:   reload policy configuration
  s:   dump system and deployment properties
  t:   dump thread list
  v:   dump thread stack
  x:   clear classloader cache
  0-5: set trace level to &lt;n&gt;
  ----------------------------------------------------
  
  
  java.lang.NoClassDefFoundError: HellowApplet (wrong name: M257Applet/HellowApplet)
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClassCond(Unknown Source)
      at java.lang.ClassLoader.defineClass(Unknown Source)
      at java.security.SecureClassLoader.defineClass(Unknown Source)
      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(Unknown Source)
      at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  Exception: java.lang.NoClassDefFoundError: HellowApplet (wrong name: M257Applet/HellowApplet)
  </code></pre>