1 Reply Latest reply on Sep 9, 2013 4:32 PM by Stephen Bell

    Japplet throws ClassNotFoundException


      I've built an applet (from JApplet) that consumes several other jar files.  I've signed the jar that contains the main class and included all of the jars I need (I think).  However, no matter what I try, I consistently get "java.lang.ClassNotFoundException: newposting" where 'newposting' is the main class within my signed jar.  I'm using the following html for this:


      <p><applet code="newposting" archive="HartfordRowingNewPosting.jar, javax.mail.jar, jcalendar-1.4.jar, junit-4.6.jar, jgoodies-common-1.2.0.jar, jgoodies-looks-2.4.1.jar, mysql-connector-java-5.1.25-bin.jar" width="500" height="850">

      <param name="permissions" value="sandbox" /> <param name="codebase" value="HartfordRowingNewPosting" /></applet></p>


      I've been frustrated with this on and off for the last month or so.  Can someone shed some light on this?  Am I getting this error because of JApplet?

        • 1. Re: Japplet throws ClassNotFoundException
          Stephen Bell

          I doubt it's to do with JApplet.


          It's too long ago for me to remember what, if any, is the significance to the applet of your codebase parameter (as opposed to attribute), but I'm a bit suspicious of that and also of the code attribute: does signed code have to be in a package, or is it OK for it to be in the default package? Certainly, the applet class name "newposting" is contrary to convention, though that wouldn't cause an error in itself.. So I'd be tempted to refactor to put your classes in a package (i.e. include the package statement in your .java files).


          What does your web server access log say? Lot's of 200 and 304 status codes, or 404?