• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Class not found problem

 
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You don't know me, but I've been looking all over the world for. Thanks to the help from this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic