Simple applet won't run - please help - TechRepublic
General discussion
April 15, 2005 at 07:46 AM
madestroitsolutions

Simple applet won’t run – please help

by madestroitsolutions . Updated 21 years, 2 months ago

Hi all,
I am an experienced programmer trying to learn Java. I have a very simple applet that I cannot get to run for some reason. Please see the code below:

import java.applet.*;
import java.awt.*;

public class BLinkJVerCheck extends Applet
{
private Label m_labVersionVendor;
public void init()
{
Color colFrameBackground = Color.pink;
this.setBackground(colFrameBackground);
m_labVersionVendor = new Label (” Java Version: ” +
System.getProperty(“java.version”) +
” from “+System.getProperty(“java.vendor”));
this.add(m_labVersionVendor);
}
}

As you can see, this a pretty simple, straight forward applet, but for some reason when I attempt to run it on a web page, I get the following error (when I put the mouse on top of the square the applet is supposed to draw):

load: class BLinkJVerCheck not found

The tag on the web page:

The applet file IS sitting in the same folder as the web page that calls it. When I compile the applet, everything goes ok, I get no errors and the class file is generated.

Any ideas….???… I always found Java annoying, and now that I finally want to make the move, I cannot get a stupid applet to work… please HELP!

Thank you in advance!

This discussion is locked

All Comments