1. IE中不显示的原因是你使用的是jdk1.1.4后的版本,需要把Applet tag修改成Object tag, 请使用Sun的html convertor转换。2. appletview中找不到你的类是因为你运行appletview时没有指定classpath

解决方案 »

  1.   

    to nek_in() 
    1。从哪里找Sun的html convertor?
    2。我的JDK 设置所有的classpath,难道还要设置appletviewer的classpath?如何设?
      

  2.   

    . 在java.sun.com上搜一下就能找到。如果找不到,有两个办法:
      i. 装netscape
      ii. 直接用我下面给的例子2. 第二个问题我说错了,应该是需要在html中的Applet的参数中增加Archive和codebase
    说明。codebase就是你的classpath,archive用来写jar文件。

    <!-- CONVERTER VERSION 1.3 -->
    <SCRIPT LANGUAGE="JavaScript"><!--
        var _info = navigator.userAgent; var _ns = false;
        var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);
    //--></SCRIPT>
    <COMMENT><SCRIPT LANGUAGE="JavaScript1.1"><!--
        var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0 && java.lang.System.getProperty("os.version").indexOf("3.5") < 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0)));
    //--></SCRIPT></COMMENT><SCRIPT LANGUAGE="JavaScript"><!--
        if (_ie == true) document.writeln('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = 800 HEIGHT = 600 ALIGN = center  codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0"><NOEMBED><XMP>');
        else if (_ns == true) document.writeln('<EMBED type="application/x-java-applet;version=1.3"  CODE = "applet类名" CODEBASE = "." ARCHIVE = "jar文件名.jar" WIDTH = 800 HEIGHT = 600 ALIGN = center  scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"><NOEMBED><XMP>');
    //--></SCRIPT>
    <APPLET  CODE = "类名" CODEBASE = "." ARCHIVE = "jar文件名.jar" WIDTH = 800 HEIGHT = 600 ALIGN = center></XMP>
    <PARAM NAME = CODE VALUE = "类名" >
    <PARAM NAME = CODEBASE VALUE = "." >
    <PARAM NAME = ARCHIVE VALUE = "jar文件名.jar" ><PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
    <PARAM NAME="scriptable" VALUE="false"></APPLET>
    null
    </NOEMBED></EMBED></OBJECT>