title: Java applet works in appletviewer, Safari and Firefox, but not Chrome
body: <p>OS: Mac OS X 10.7.3
  Chrome: 19.0.1051.0 canary
  Java: 32-bit and 64-bit version of Java SE 6</p>
  
  <p>Directory structure:</p>
  
  <ul>
  <li>page.html</li>
  <li>Test.jar
  <ul>
  <li>META-INF
  <ul>
  <li>MANIFEST.MF</li>
  <li>SELF-SIG.SF</li>
  <li>SELF-SIG.DSA</li>
  </ul></li>
  <li>com
  <ul>
  <li>tyilo
  <ul>
  <li>Test
  <ul>
  <li>Test$1.class</li>
  <li>Test.class</li>
  </ul></li>
  </ul></li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>page.html:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;title&gt;Testing applet&lt;/title&gt;
          &lt;style type="text/css"&gt;
  
          &lt;/style&gt;
          &lt;script type="application/javascript"&gt;
  
          &lt;/script&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;object type="application/x-java-applet" height="300" width="550"&gt;
              &lt;param name="code" value="com.tyilo.Test.Test"&gt;
              &lt;param name="archive" value="Test.jar"&gt;
              Applet failed to run.  No Java plug-in was found.
          &lt;/object&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Test.java:</p>
  
  <pre><code>package com.tyilo.Test;
  
  import java.awt.Graphics;
  import java.io.BufferedWriter;
  import java.io.FileWriter;
  import java.security.AccessControlException;
  import javax.swing.JApplet;
  
  public class Test extends JApplet
  {
  
      private static final long serialVersionUID = 1L;
  
      public String text;
  
      @Override
      public void init()
      {   
          text = "~/test.txt created successfully!";
          try
          {
              FileWriter fstream = new FileWriter(System.getProperty("user.home") + "/test.txt");
              BufferedWriter out = new BufferedWriter(fstream);
              out.write("Testing123");
              out.close();
          }
          catch(AccessControlException e)
          {
              text = "File permission error.";
          }
          catch(Exception e)
          {
              text = "Unknown error: " + e.getMessage();
          }
      }
  
      @Override
      public void paint(Graphics g)
      {
          g.drawString(text, 50, 30);
      }
  
      @Override
      public void start()
      {
          //TODO
      }
  
      @Override
      public void stop()
      {
          //TODO
      }
  
      @Override
      public void destroy()
      {
          //TODO
      }
  }
  </code></pre>
  
  <p>Java console error in chrome:</p>
  
  <pre><code>load: class com.tyilo.Test.Test not found.
  java.lang.ClassNotFoundException: com.tyilo.Test.Test
      at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:252)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Plugin2ClassLoader.java:249)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:179)
      at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:160)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Plugin2ClassLoader.java:690)
      at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:3045)
      at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1497)
      at java.lang.Thread.run(Thread.java:680)
  Exception: java.lang.ClassNotFoundException: com.tyilo.Test.Test
  </code></pre>
  
  <p><strong>Edit</strong>
  The code seems to run fine in the latest stable version of chrome, so this might just be a bug in the canary version.</p>
  
  <p><strong>Edit 2</strong></p>
  
  <p>There is only a problem with chrome when running the html (and jar) locally.</p>