Applet的测试

来源:互联网 发布:安徽财经大学网络选课 编辑:程序博客网 时间:2024/06/05 18:51

如果只是想简单的测试一下,那么根本不用上网。直接启动Web浏览器,打开含applet标记的HTML文件就可以了。浏览器装载HTML的时候会发现applet标记,并且按照code的值去找相应的.class文件。当然,是在CLASSPATH里面找。如果CLASSPATH里没有,它就在浏览器的状态栏里给一个错误信息,告诉你找不到.class文件。

You can perform a simple test without any network connection by starting up your Web browser and opening the HTML file containing the applet tag. As the HTML file is loaded, the browser will discover the applet tag and go hunt for the .class file specified by the code value. Of course, it looks at the CLASSPATH to find out where to hunt, and if your .class file isn’t in the CLASSPATH, then it will give an error message on the status line of the browser to the effect that it couldn’t find that .class file.

If you just want to test simply, you need not connect to the internet.  Start your web browser and open a HTML file with applet tags. When browser louads the HTML file it will detect the applet tag and find the .cass file according to the value of code element. Certainly it finds in CLASSPATH. If the .cass file is not in CLASSPATH , it will generate an error message in status bar of the browser telling you  that it cann't find the .cass file

NOTES:
start up