So, I wrote my code for the Snake game for a little kid that I know, and the damn thing will not be embedded in html.
<html> <head> <title>Snake</title> </head> <body> <applet width=200 height=100 code="SnakeGame.class"> </applet> </body> </html>
and I'm sure the class file is in the same directory as snake.html , but it still refuses to run. He always answers:
java.lang.NoClassDefFoundError: SnakeGame (wrong name: view/SnakeGame)
Does anyone know why? Thanks.
EDIT:
view folder contains: SnakeGame.class and all other classes for the game, as well as html
java applet
Ritwik bose
source share