This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Missing Applet" Watch "Missing Applet" New topic
Author

Missing Applet

Tim Barker
Greenhorn

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
Sheriff

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
Greenhorn

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
Greenhorn

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.

Hi
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 java.sun.com and enter CODEBASE in search - I bet you'll find there the info.
Pavel.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Missing Applet