Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

ClassNotFoundException with Java Plugin

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My applet throws a ClassNotFoundException:webprocessor.WebEPApplet.class not found when I use the Java plugin. But if I uninstall the plugin the applet works fine. This is the html I use for when the plugin isn't installed:
<APPLET CODE = "webprocessor/WebEPApplet.class" WIDTH = 510 HEIGHT = 450 >
<PARAM NAME="cabinets" value=",">
<PARAM NAME = "userID" VALUE ="<%=request("userID")%>">
And this is the source when it is:
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = 510 HEIGHT = 450 codebase=",2,0,0">;
<PARAM NAME = CODE VALUE = "webprocessor/WebEPApplet.class" >
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.2">
<PARAM NAME = "cabinets" VALUE =",">
<PARAM NAME = "codebase" VALUE ="/">
<PARAM NAME = "java_codebase" VALUE ="/">
I have tried to leave the CODE value as "webprocessor/WebEPApplet" but it still gives the same error.
Is there a different syntax that I need to use to load my own classes within my own package?
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im a bit lost here as to why it works without and not with the plugin, but maybe try to use the codebase attribute for the directory and the code for the class name.
like this:
<applet codebase="/webapps" code="my class" width="100" height ="100" >
<params here>
<and here>
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this with a 1.3 plugin? I've seen some reports of problems with the 1.3.1_02 plugin, and maybe other 1.3. Sun mentions that the new plugins won't accept class files with format violations created by some of the older compliers, but the exception dumps I've seen don't seem to exactly the exceptions associated with that mismatch, so I'm not sure that is the cause. However, applet for which I've seen the problem (that is, works on IE5.5, but not with 1.3.1_02 plugin) were likely compiled under 1.1.8 or earlier, so they could be the source of the problem.
As I recall, the incompatibility is mentioned in the J2SDK 1.3.1_02 release notes.
    Bookmark Topic Watch Topic
  • New Topic