下面是找到的错误提示为什么有些人不会错呢。载入:找不到类 untitled1.Applet1.class。java.lang.ClassNotFoundException: untitled1.Applet1.class at sun.applet.AppletClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.applet.AppletClassLoader.loadCode(Unknown Source) at sun.applet.AppletPanel.createApplet(Unknown Source) at sun.plugin.AppletViewer.createApplet(Unknown Source) at sun.applet.AppletPanel.runLoader(Unknown Source) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source)Caused by: java.io.IOException: open HTTP connection failed. at sun.applet.AppletClassLoader.getBytes(Unknown Source) at sun.applet.AppletClassLoader.access$100(Unknown Source) at sun.applet.AppletClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) ... 10 more
<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 = "http://577.86.cn/_temp/"
code = "untitled1.Applet1.class"
name = "TestApplet"
width = "600"
height = "300"
hspace = "0"
vspace = "0"
align = "middle"
>
</applet>
</body>
</html>
untitled1.Applet1.class
已经指定了相应的包untitled1
所以前面的codebase就不用指入untitled1了。
我也是这样想的,就不用在指定目录了,用 codebase = "." 就可以了.可是为什么我家里的机子不能用呢.