Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class not found problem

 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay,
I've created a simple menu navigation applet for my homepage. It is entitled ButtonMenu.java, and after I compile it, I can view it in the appletviewer fine, but it won't appear in IE5 or Netscape. Down on the status bar it says Load: Class ButtonMenu not found.
I wondered if this has something to do with my event handling. I used an anonymous inner class for each JButton, and as a result I get five .class files when I compile it. If anyone knows why this applet works in the appletviewer, but not in a web browser, please let me know.
Thanks,
Sean
 
Yogesh MSharma
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You Should Use the URL to Load The Class
Your Are missing Class form the Browser Path
Try To make HTML file in hte same directory .
Best Of LUCK
 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you mean use a URL?
Everything is in the same directory. Do you mean to use a URL with the code attribute in the applet tag?
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sean,
It has nothing to do with how you are handling events. It is probably related to the CODEBASE attribute of the APPLET tag. Make sure you send in a CODEBASE:
The top level directory in which your class files exist.
Regards,
Manfred.
 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Manfred,
Thanks for your reply. Am I to use the code attribute with the codebase attribute or just the codebase attribute? My file is called ButtonMenu.class, and I've been including it in the code attribute. Thanks for your help.
-Sean
 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I discovered my main problem. My applet was a JApplet, and the jvm in my browser is so old, that it only recognizes Applets and not JApplets. I think it's time I upgrade my Java plugin.
Thanks for all the help.
-Sean
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic