I
iamfish
Unregistered / Unconfirmed
GUEST, unregistred user!
写过一点点Java Application,也没怎么遇过难题.这两天想写点Applet,即遇到这样的问题,已经两天了.
写了一个HelloWord的小Applet.编译成功,用AppletViewer查看也成功,但在网页中就是"Load: Class GetURL no found."
查看IE的缓存,有GetURL.class文件.
JDK 是:j2sdk1.4.1_01
我用JCreator2.5编译.也有试过用Javac编译,都不行.运行Java Application可以.查看网上其它的Applet也可以.
___________________________________________________
GetULR.java
___________________________________________________
import java.awt.*;
import java.applet.*;
public class GetURL extends Applet {
public void init() {
}
public void paint(Graphics g) {
g.drawString("Welcome to Java!!", 50, 60 );
}
}
___________________________________________________
GetULR.htm
___________________________________________________
<html>
<title>Test</title>
<head></head>
<body>
<applet cabbase="." code="GetURL.class" height="300" width="300" alt="Applet" mayscript="A" name="AP">test</applet>
</body>
</html>
测试:
http://www.chaoshan.com/lazyboy/java/GetURL.htm
下载
http://www.chaoshan.com/lazyboy/java/GetURL.rar
大家帮想一下是什么问题吧.是不是JSDK的问题?
写了一个HelloWord的小Applet.编译成功,用AppletViewer查看也成功,但在网页中就是"Load: Class GetURL no found."
查看IE的缓存,有GetURL.class文件.
JDK 是:j2sdk1.4.1_01
我用JCreator2.5编译.也有试过用Javac编译,都不行.运行Java Application可以.查看网上其它的Applet也可以.
___________________________________________________
GetULR.java
___________________________________________________
import java.awt.*;
import java.applet.*;
public class GetURL extends Applet {
public void init() {
}
public void paint(Graphics g) {
g.drawString("Welcome to Java!!", 50, 60 );
}
}
___________________________________________________
GetULR.htm
___________________________________________________
<html>
<title>Test</title>
<head></head>
<body>
<applet cabbase="." code="GetURL.class" height="300" width="300" alt="Applet" mayscript="A" name="AP">test</applet>
</body>
</html>
测试:
http://www.chaoshan.com/lazyboy/java/GetURL.htm
下载
http://www.chaoshan.com/lazyboy/java/GetURL.rar
大家帮想一下是什么问题吧.是不是JSDK的问题?