A simple Applet that doesn't work...

1. The class file is compiled without any problems
2. The html-file works. It's in the same directory.
But when I open the html-file I've this output
(Java Console InternetExplorer 5.5):
Error loading class: test
java.lang.NoClassDefFoundError
java.lang.ClassNotFoundException: test
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/applet/AppletPanel.securedClassLoad
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
In Netscape...(Java Console):
Netscape Communications Corporation -- Java 1.1.5
Type '?' for options.
Symantec Java! ByteCode Compiler Version 210.065
Copyright (C) 1996-97 Symantec Corporation
# Applet exception: error: java.lang.ClassFormatError: Bad major version number
java.lang.ClassFormatError: Bad major version number
at java.lang.ClassLoader.defineClass(Compiled Code)
at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
at netscape.applet.AppletClassLoader.findClass(Compiled Code)
at netscape.applet.AppletClassLoader.loadClass1(Compiled Code)
* at netscape.applet.AppletClassLoader.loadClass(Compiled Code)
at netscape.applet.AppletClassLoader.loadClass
(Compiled Code)
at netscape.applet.DerivedAppletFrame$LoadAppletEvent.dispatch(Compiled Code)
at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)
at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
The code of the applet is:
import java.awt.*;
import java.applet.*;
public class test extends Applet {
String text = "error";
int x = 0;
int y = 20;
public synchronized void init() {
          text = getParameter("text");
          try {
               x = Integer.parseInt(getParameter("x"));
               y = Integer.parseInt(getParameter("y"));
               } catch ( NumberFormatException ex ) {}
public synchronized void paint(Graphics g) {
          g.setFont( new Font("TimesRoman", Font.BOLD+Font.ITALIC, 36));
          g.drawString(text,x,y);
The HTML code is:
<html>
<body>
<applet code="test.class" width="300" height="300">
     <param name="text" value="Browser Usage">
     <param name="x" value="50">
     <param name="y" value="50">
</applet>
</body>
</html>
Thanks!

works here,
http://www.geocities.com/rmlchan/test.html
use the same jdk and jre/plug-in for the browser.

Similar Messages

Maybe you are looking for

  • Suddenly some of the characters in mail have turned into 'A's with boxes around them?

    I don't think I changed any settings, but suddenly some of the characters in my emails received have utrned into 'A's with boxes around them. A think the characters that have changed are in italics (see pic below). Any suggestions what has gone wrong

  • Balance in cash flow

    hi,      i want   to create query just like cash flow report. but i dont  get    balance  in my query.   i have requred  balance       check out my query. SELECT          T1.refdate as 'Reference Date',         T2.duedate as 'DueDate',         T1.MEM

  • Help needed on start up

    Hello all... I seemed to have done something very bad to my iMac.  When I start it up 3 images flash repeatedly and there is no way for me to start any work on my computer.  The 3 images that flash are the apple logo, a prohibited symbol, and the fil

  • Debugging RFC-call in ERP-system

    Hi experts, I've a similar  problem as decribed Values for FM structure not delivered as expected - but the opposite direction: we send data from PI, which received a FTP-file,  to ERP by RFC-Function. last week we enhanced the output structure for t

  • Can anyone gimme the song list played before the keynote at wwdc 14. i heard those songs while streaming the wwdc 14 video.

    can anyone gimme the song list played before the keynote at wwdc 14. i heard those songs while streaming the wwdc 14 video.