<html> <body> Here comes my first applet: <br> <applet code=HelloWorld.class width=650 height=500> </applet> </APPLET> </body> </html> 将该文件和HelloWorld.java放在同一个目录中,然后编译HelloWorld.java之后,直接点击test.htm打开,就可以看到Applet程序被启动了.或者使用AppletViewer命令AppletViewer test.htm也可以不需要浏览器直接运行该Applet。