title: java.lang.ClassNotFoundException when trying to load applet from a .jar file
body: <p>Sorry for this question but I'm a newbie to Java. I tried searching for similar problems, and I did find some answers, but none worked in my case, so here it goes:</p>
  
  <p>I'm trying to load a java applet on a web page. The applet is supposed to be loaded from a .jar file (UCFApplet.jar), but I cannot get it to load no matter what.</p>
  
  <p>Here's the html for the applet:</p>
  
  <pre><code>&lt;applet id="UCFApplet" height="200" width="200" 
    code="com.fujitsu.test.applet.UCFApplet" 
    archive="UCFApplet.jar"&gt;
  &lt;/applet&gt;
  </code></pre>
  
  <p>The jar file is on the server, on the same folder than the html file that is trying to load it. Inside the jar file there's a  UCFApplet.class file on com/fujitsu/test/applet folder. </p>
  
  <p>The error I'm getting on the Java console is the following:</p>
  
  <pre><code>Java Plug-in 1.6.0_29
  Using JRE version 1.6.0_29-b11 Java HotSpot(TM) Client VM
  User home directory = C:\Users\PTMAIAJ
  ----------------------------------------------------
  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;
  ----------------------------------------------------
  
  
  load: class com.fujitsu.test.applet.UCFApplet not found.
  java.lang.ClassNotFoundException: com.fujitsu.test.applet.UCFApplet
      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.ClassNotFoundException: com.fujitsu.test.applet.UCFApplet
  </code></pre>
  
  <p>As you can see, I'm using jre 1.6.0_29 build 11, which, from what I get on the Oracle page, is the latest build. This happens on all browsers (IE 9, FF, Chrome).</p>
  
  <p>I suspect it may have something to do with not being able to access the .jar file because if I change the html code to a dummy name such as archive="thisFileDoesNotExist.jar" it gives me the same error. But I don't really know what to put there in order to make it work.</p>
  
  <p>Any idea about what I can be doing wrong ?</p>
  
  <p>Thank you and best regards,</p>
  
  <p>Joao Maia</p>