Solved

Java Applet not loading in browser

Posted on 2010-11-29
5
308 Views
Last Modified: 2012-05-10
I used an existing working java checkers applet game.  It had:
Checkers.class
ConsoldeCanvans.class
ConsolePanle.class
ConsoleApplet.class
and some other class files:
example: Checkers$Board.class

also supplied was the Checkers.java

I created a project in NetBeans call "javachekcers" , added the class files and been editing the Checkers .java file but when I recompiled it and uplaoded all the class files to the web server the applet no longer works (I can run it in debug in NetBeans).

I found lots of suggestion about the html code attribute of the applet tag, but haven't been able to get to work: <applet code="javacheckers.Checkers" width="350" height="250" alt="(Applet 'Checkers' should be displayed here.)"> is what i currently use to call it.

and the applet is here: http://www.e3pro.com/test/test1.html

Here is the first of many errors: java.lang.NoClassDefFoundError: Checkers (wrong name: javacheckers/Checkers)
 
Suggestions?

thanks!
Christa
0
Comment
Question by:christamcc
  • 3
5 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 34229453
Your package is probably wrong. It needs to be (in relation to where the html is)

./javacheckers/Checkers.class
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34229465
The code should be available at

http://www.e3pro.com/test/javacheckers/Checkers.class

and the package declaration in the source should be

package javacheckers;
0
 
LVL 16

Expert Comment

by:Valeri
ID: 34229485
0
 

Author Closing Comment

by:christamcc
ID: 34229488
oh, man!  My savior!  and speedy... :)  Thank you!
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 34229496
:)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Requested array size exceeds VM limit 3 84
maven example error 3 52
thymeleaf natural templating vs JSP 2 68
egit plugin on eclipse 8 38
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now