applet code = "Applet1.class"

解决方案 »

  1.   

    打开任务条右边system tray里的java虚拟机图标看看是什么问题
      

  2.   

    1 回复人: liqiangcong(松树) 已经设置过路径了。其他的非applet类程序编译运行都没这样的问题的
    2 回复人: weimenren(一只笨猪,而且很懒) 试着加了引号以后结果一样。。一个灰色的框框
    3 回复人: songhtao(三十年孤独)  ie不是都支持java的么?怎么看到底支持还是不支持呢?
    另:如果我的ie不支持我该怎么办 ?
      

  3.   

    文件要放在同一目录,你用的awt组件,IE支持的,只是你的版本是多少?
      

  4.   

    我的applet1.java
    package untitled1;import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;/**
     * <p>Title: </p>
     * <p>Description: </p>
     * <p>Copyright: Copyright (c) 2002</p>
     * <p>Company: </p>
     * @author not attributable
     * @version 1.0
     */public class Applet1 extends Applet {
      private boolean isStandalone = false;
      //Get a parameter value  public void paint(Graphics g) {
        g.drawString("First applet", 10, 10);
    }  public String getParameter(String key, String def) {
        return isStandalone ? System.getProperty(key, def) :
          (getParameter(key) != null ? getParameter(key) : def);
      }  //Construct the applet
      public Applet1() {  }
      //Initialize the applet
      public void init() {
        try {
          jbInit();
        }
        catch(Exception e) {
          e.printStackTrace();
        }
      }
      //Component initialization
      private void jbInit() throws Exception {
      }
      //Get Applet information
      public String getAppletInfo() {
        return "Applet Information";
      }
      //Get parameter info
      public String[][] getParameterInfo() {
        return null;
      }
    }
    applet1.html
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=GBK">
    <title>
    HTML Test Page
    </title>
    </head>
    <body>
    untitled1.Applet1 will appear below in a Java enabled browser.<br>
    <applet
      codebase = "."
      code     = "untitled1.Applet1.class"
      name     = "TestApplet"
      width    = "400"
      height   = "300"
      hspace   = "0"
      vspace   = "0"
      align    = "middle"
    >
    </applet>
    </body>
    </html>没有任何问题