【开源中国 APP 全新上线】“动弹” 回归、集成大模型对话、畅读技术报告”
代码如下:Hello.java:import java.applet.*; import java.awt.*; public class Hello extends Applet { public void print (Graphics g) { g.drawRoundRect(0, 0, 499, 149, 70, 70); g.drawString("hello,world!", 200, 70); } }
test.html:
<html> <head> <title>applet test</title> </head> <body> <center> <applet code="Hello.class" width="500" height="150"></applet> </center> </body> </html>
1、将Hello.java编译生成的Hello.class和test.html放在同一文件夹下;
2、jdk均是最新版本:1.7.0_55;
3、“控制面板--程序--java--安全--安全级别”设置为最低;
异常:在笔记本上能打开,但是在另外一台机子上就不行了。
唯一区别:笔记本的jre版本1.7.0_55-b14、台机jre版本1.7.0_55-b13。
求解,谢谢。