Hello,

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">
<html>
<!-- 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. -->
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Hello Applet</title>
    </head>
    <body>
        <h1>Hello Applet</h1>
        <hr>
        <applet code="Hello.class" 
            width=500 
            height=500
            codebase="."
            archive="Hello.jar"
            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!      
        </applet>
        <hr>
    </body>
</html>

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~

The contents of Hello.jar:

META-INF/
META-INF/MANIFEST.MF
Hello.class

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

Thank you!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.