Code Comments
Programming Forum and web based access to our favorite programming groups.Hi everybody, want to make a first little applet, but can't start it. Can someone please h elp. The java code:The HTML code looks like this:code:
package guiVE; import java.applet.Applet; import java.awt.BorderLayout; import java.awt.Label; public class SimpleApplet extends Applet { private static final long serialVersionUID = 1L; /** * This is the default constructor */ public SimpleApplet() { super(); } /** * This method initializes this * * @return void */ public void init() { this.setSize(300, 200); } /** * This method initializes this * * @return void */ public void start() { this.setLayout(new BorderLayout()); this.add(new Label("Hello Applet"), Label.CENTER); } }When I try to start it with firefox or konqueror, I get this failure message from the console:code:
<html> <head> <title></title> <meta content=""> <style></style> </head> <body> <applet code="SimpleApplet.class"></applet> </body> </html>Would be real great, if someone could explain what that means and what I did wrong. greetz, kaicode:
java.lang.NoClassDefFoundError: SimpleApplet (wrong name: guiVE/SimpleApplet ) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:192) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:127) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:632) at sun.applet.AppletPanel.createApplet(AppletPanel.java:786) at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2108) at sun.applet.AppletPanel.runLoader(AppletPanel.java:715) at sun.applet.AppletPanel.run(AppletPanel.java:369) at java.lang.Thread.run(Thread.java:619)
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.