将你的class用<applet></applet>标签加入网页中
切换到网页文件所在目录
执行 appletviewer 文件名.html
就可以执行了:)

解决方案 »

  1.   

    appletviewer的功能相当浏览器;xxx.class 必须是Applet小程序
    appletviewer xxx.html;
    xxx.html:
    <html>
    <head><title></title></head>
    <body>
    <hr><hr>
    <applet  code=xxx.class
             width=300  height=200>
    </applet>
    </body>
    </html>
      

  2.   

    appletviewer *.html 就是楼上的方法了更方便的方法是把<appplet>标记以注释的方式放到java文件中
    //<applet  code=xxx.class
    //         width=300  height=200>
    //</applet>appletviewer *.java(不是class)
      

  3.   

    你应该这样
    <applet code=xxx.class width=400 height=300>
    </applet>
    然后保存为yyy.html
    再执行appletviewer yyy.html