Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

noob q: Can't start applet
Hi everybody, 
want to make a first little applet, but can't start it. Can someone please h
elp. The java code:
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); } }
The HTML code looks like this:
code:
<html> <head> <title></title> <meta content=""> <style></style> </head> <body> <applet code="SimpleApplet.class"></applet> </body> </html>
When I try to start it with firefox or konqueror, I get this failure message from the console:
code:
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)
Would be real great, if someone could explain what that means and what I did wrong. greetz, kai

Report this thread to moderator Post Follow-up to this message
Old Post
kaiak
06-03-08 12:26 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Programmer archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Forum Jump:
All times are GMT. The time now is 09:55 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.