Results 1 to 3 of 3
  1. #1
    dan0 is offline Member
    Join Date
    Feb 2009
    Rep Power

    Question [SOLVED] ClassNotFoundException Error

    When I try to run my applet in a Firefox or IE browser I get the error below, anyone know how to resolve this?

    load: class TestAppletGUI not found.
    java.lang.ClassNotFoundException: TestAppletGUI
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unk nown Source)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Unk nown Source)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionR Source)
    at Source)
    Caused by: open HTTP connection failed: server_address/TestAppletGUI.class
    at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unk nown Source)
    at sun.plugin2.applet.Applet2ClassLoader.access$000(U nknown Source)
    at sun.plugin2.applet.Applet2ClassLoader$ n Source)
    at Method)
    ... 7 more
    Exception: java.lang.ClassNotFoundException: TestAppletGUI
    There are two classes TestAppletGUI and AppletGUI, which are in a named package - projects.web - both of these classes are archived in UserInterface.jar

    In my web-page I use an applet tag:

    Java Code:
    <applet code="TestAppletGUI" archive="UserInterface.jar" width="500" height="500">

  2. #2
    dan0 is offline Member
    Join Date
    Feb 2009
    Rep Power

    Default [resolved]

    I got the applet to run by:
    1. Changing the code reference to: projects.web.TestAppletGUI (the FQCN)
    2. re-archiving the class files

    To create the jar file I used the following cmd:
    Java Code:
    jar cvf UserInterface.jar projects\web\AppletGUI.class projects\web\TestAppletGUI.class
    Last edited by dan0; 03-03-2009 at 05:42 PM.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


    Congrats on solving this yourself, and many thanks for posting your solution for others to learn from. It's uncommon to see this.

Similar Threads

  1. ClassNotFoundException with Applet and new JRE
    By marrra in forum Java Applets
    Replies: 3
    Last Post: 06-22-2010, 11:13 AM
  2. ClassNotFoundException: org.sqlite.JDBC
    By JohnnyR in forum AWT / Swing
    Replies: 4
    Last Post: 02-25-2009, 06:30 AM
  3. ClassNotFoundException
    By Chezelle in forum Java Applets
    Replies: 5
    Last Post: 12-24-2008, 04:26 PM
  4. Replies: 0
    Last Post: 07-09-2008, 12:36 PM
  5. java.lang.ClassNotFoundException
    By ravian in forum New To Java
    Replies: 1
    Last Post: 01-07-2008, 10:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts