I am testing the following applet on my webpage:

import javax.swing.*;

public class Hello extends JApplet
    public void init()
        JOptionPane.showMessageDialog (null, "Hello World");

My Hello.html file from BlueJ:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- This file automatically generated by BlueJ Java Development  -->
<!-- Environment.  It is regenerated automatically each time the  -->
<!-- applet is run.  Any manual changes made to file will be lost -->
<!-- when the applet is next run inside BlueJ.  Save into a       -->
<!-- directory outside of the package directory if you want to    -->
<!-- preserve this file. -->
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Hello Applet</title>
        <h1>Hello Applet</h1>
        <applet code="Hello.class" 
            alt="Your browser understands the &lt;APPLET&gt; tag but isn't running the applet, for some reason."

            Your browser is ignoring the &lt;APPLET&gt; tag!      

The "Hello.html", "Hello.jar" and "Hello.class files" are inside the public_html folder of my webpage.

When I run the program in IE (10.0.9), a java command line appears and the "Java symbol" appears and runs for a while with no output and finally an exception of "Hello.class not found" is shown (even though Hello.class is inside the public_html folder).

I can run the program using "appletviewer Hello.html"in the command line.

I would be grateful for any help.

Thank you~

Edited 3 Years Ago by sciprog22

The contents of Hello.jar:


I fail to see why IE is not able to find Hello.class

Thank you!

This article has been dead for over six months. Start a new discussion instead.