java.lang.NoClassDefFoundError when trying to embed an applet

后端 未结 1 1045
广开言路
广开言路 2021-01-27 05:37

So I wrote my code for a Snake game for a kid I know and the darned thing won\'t embed itself in html.



Snake         


        
相关标签:
1条回答
  • 2021-01-27 06:02

    It seems that SnakeGame class in in the view package, so your applet tag should look like:

    <applet width=200 height=100 code="view.SnakeGame.class">
    

    Generally you specify 'package.class' in the 'code' attribute, i.e. com.stackoverflow.MyClass.class

    0 讨论(0)
提交回复
热议问题