File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Missing Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Missing Applet" Watch "Missing Applet" New topic

Missing Applet

Tim Barker

Joined: Aug 03, 2001
Posts: 24
TO Expert:
I am trying to get an applet to work. I ran the applet off line in my browser and it worked okay. Then when I uploaded to my web site it stopped working. I noticed earlier that the applet would not work if I changed directories. In other words, when I droped it in to a folder it stopped working (I mention this because I think this is related to why it will not work now). The source code contains the line:
Public class yig3 extends java.applet.Applet implements Runnable
I am thinking that the java.applet.Applet is causing the problem, but I may be wrong.
I orginally had this HTML Code:
<applet codebase="." code="yig3.class" height=250 width=250>
I tried changing it to this:
<applet code=yig3.class codebase=java/yig3/ width=255 height=275>
Is it my html or my source code that is giving me problems? Any assistants will be appreciated.
Michael Ernest
High Plains Drifter

Joined: Oct 25, 2000
Posts: 7292

Hi Tim -
There's no way to tell from above if your Applet code has a problem, but let's assume that it doesn't.
One way to test for codebase issues: put the .class at the top of the web servers document base, and remove the codebase tag altogether. If that works, you'll know the problem lies in the way you're using codebase.
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide

Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Tim Barker

Joined: Aug 03, 2001
Posts: 24
Ok I'll try that as soon as I figure out what a web servers document base is.
Pavel Kletskov

Joined: Aug 21, 2001
Posts: 3
Originally posted by Tim Barker:
Ok I'll try that as soon as I figure out what a web servers document base is.

if applet code lies in the same directory as html page , you don't need codebase variable at all in your tag. Otherwise you use relative path to your class from the directory of html.
Go to and enter CODEBASE in search - I bet you'll find there the info.
I agree. Here's the link:
subject: Missing Applet
It's not a secret anymore!