I have written this applet... which I'm not sure even works... but when I go to run the html page, it says class AlarmContainer not found. However, it's in the same directory as the html page calling the applet. Is there a reason why it wouldn't be able to find this class file? Here's my html code that creates the applet on the page. Thanks.
<applet code="AlarmContainer" width="200" height="200" ID="Alarm" codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,2,0,0">
<PARAM NAME="CODE" VALUE="AlarmContainer.class">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.2">
<param name="snd" value="alarm.au">
<param name="bgColor" value="233,10,34">
<param name="Times" value="7:19|8:15">
<EMBED type="application/x-java-applet;version=1.2" java_CODE="AlarmContainer.class" WIDTH="200" HEIGHT="200" pluginspage="http://java.sun.com/products/plugin/1.2/plugin-install.html"><NOEMBED>
alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason."
Your browser is completely ignoring the <APPLET> tag!
</NOEMBED></EMBED>
alt="Your browser understands the <APPLET> tag but isn't running the applet,
for some reason." Your browser is completely ignoring the <APPLET> tag!
</applet>
Since your applet class is at the same location as your html document, you don't need to set codebase attribute of applet tag. It seems from your post that you were trying to use OBJECT tag because maybe your applet contains swing controls. The codebase attribute that you are using is for OBJECT tag and not for applet tag. Here is what you need to do. 1. Write a simple applet tag with no codebase attribute in it. Use code attribute for applet tag which should have the value as the name of the applet class as code="abc.class". If your applet class is in a package , say p1, then your code attribute will be as CODE="p1.abc.class". If your applet class is in a package then you must also use CODEBASE attribute and usually on local machine it will be same as one of your classpath entry, so that CODEBASE + CODE should give you the complete path of your applet class. 2. If you are using swings in your applet, then perform step1 and then download HTML converter from java.sun.com. Run HTML converter against your html file containg applet tag in STEP1 and it will give you OBJECT and EMBED tag correctly. Run the new html file and I hope you will get what you want.