Having trouble viewing my applet


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Having trouble viewing my applet

  1. #1
    Join Date
    Nov 2002
    Posts
    2

    Having trouble viewing my applet

    Hello,

    I have an applet that works fine when I view it using appletviewer, however it doesnt work when I try to view it using my browser. I can view other applets but not this one.

    The main applet class is called SRT.class. Whenever I try to load it in IE it says "Cannot find SRT.class" and the Java console says that there is no such class def but I know its there.

    I dont understand why I can view it fine with appletviewer and not with IE. How come it cant find the class thats there?

    I have attached my class files with the html I was using to call it.

    Any help is greatly appreciated.

    -Flack
    Attached Files Attached Files

  2. #2
    Join Date
    Mar 2003
    Posts
    86

    archive

    The problem is that you didn't tell the browser where to look for the class.

    1 - put your classes in a jar / zip file.
    2 - add archive attribute to the applet tag in the html file.
    3 - make sure your jar / zip file is located in the same place your html is.

    Sharbov.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center