Redian新闻
>
请教各位高手一个applet的问题
avatar
请教各位高手一个applet的问题# Java - 爪哇娇娃
k*4
1
编了一个applet 可以在eclipse上面用applet viewer运行 但是无法在ie上运行
搜索了一下 原因在于使用了swing 而ie无法进行编译
需要对html文件进行修改
下面是html文件的代码


A SIMPLE APPLET Example1


HERE IS THE OUT PUT OF MY PROGRAM




试了好久都没成功 很郁闷
本人是非cs专业的菜鸟 希望各位高手帮帮忙 多谢拉
avatar
l*0
2

具体?

【在 k******4 的大作中提到】
: 编了一个applet 可以在eclipse上面用applet viewer运行 但是无法在ie上运行
: 搜索了一下 原因在于使用了swing 而ie无法进行编译
: 需要对html文件进行修改
: 下面是html文件的代码
:
:
: A SIMPLE APPLET Example1
:
:
: HERE IS THE OUT PUT OF MY PROGRAM

avatar
g*g
3
打开java控制台,看看出错原因。

【在 k******4 的大作中提到】
: 编了一个applet 可以在eclipse上面用applet viewer运行 但是无法在ie上运行
: 搜索了一下 原因在于使用了swing 而ie无法进行编译
: 需要对html文件进行修改
: 下面是html文件的代码
:
:
: A SIMPLE APPLET Example1
:
:
: HERE IS THE OUT PUT OF MY PROGRAM

avatar
k*4
4

看不懂 汗。。。
Java Plug-in 1.6.0_12
Using JRE version 1.6.0_12 Java HotSpot(TM) Client VM
User home directory = C:\Users\Hao

【在 g*****g 的大作中提到】
: 打开java控制台,看看出错原因。
avatar
g*g
5
跟swing无关,你的applet要干啥,是不是有读取本地文件之类的操作。

【在 k******4 的大作中提到】
:
: 看不懂 汗。。。
: Java Plug-in 1.6.0_12
: Using JRE version 1.6.0_12 Java HotSpot(TM) Client VM
: User home directory = C:\Users\Hao

avatar
k*4
6

对对 这个applet就是可以弹出来一个jframe 然后用JFileChooser选定一个本地文件
读取里面的数据 进而对数据进行处理

【在 g*****g 的大作中提到】
: 跟swing无关,你的applet要干啥,是不是有读取本地文件之类的操作。
avatar
g*g
7
applet干不了这个,非要干的话要改permission file.
你去google一下applet security restriction就知道了。

【在 k******4 的大作中提到】
:
: 对对 这个applet就是可以弹出来一个jframe 然后用JFileChooser选定一个本地文件
: 读取里面的数据 进而对数据进行处理

avatar
k*4
8

原来是这样啊 多谢多谢!
那为什么在applet viewer上面可以呢?

【在 g*****g 的大作中提到】
: applet干不了这个,非要干的话要改permission file.
: 你去google一下applet security restriction就知道了。

avatar
g*g
9
applet viewer是用来测试用的,基本上就是把applet当作application
跑,所以没有这问题。

【在 k******4 的大作中提到】
:
: 原来是这样啊 多谢多谢!
: 那为什么在applet viewer上面可以呢?

avatar
k*4
10

这样啊!多谢多谢 我再试试看呵呵

【在 g*****g 的大作中提到】
: applet viewer是用来测试用的,基本上就是把applet当作application
: 跑,所以没有这问题。

avatar
s*n
11
delete line passwordChecking.java:41....
but that's just the beginning of your nightmares, hehe.
and Capitalize your class names - PasswordChecking.
That should be in lession #1.

Unknown

【在 k******4 的大作中提到】
:
: 这样啊!多谢多谢 我再试试看呵呵

avatar
k*4
12

不是这个问题
我把frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);这句话删掉之后
applet就可以在ie上运行了 我也搞不懂为什么
但现在的问题就是无法用JFileChooser来获取本地的文件

【在 s******n 的大作中提到】
: delete line passwordChecking.java:41....
: but that's just the beginning of your nightmares, hehe.
: and Capitalize your class names - PasswordChecking.
: That should be in lession #1.
:
: Unknown

avatar
l*0
13

Applet有数字签名,使用数字签名就可以解决applet的沙箱权限

【在 k******4 的大作中提到】
:
: 不是这个问题
: 我把frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);这句话删掉之后
: applet就可以在ie上运行了 我也搞不懂为什么
: 但现在的问题就是无法用JFileChooser来获取本地的文件

avatar
k*4
14

请问是如何数字签名呢 用cacerts对生成的jar文件签名吗
还是修改java.policy.applet呢
能不能详细说说阿 多谢多谢:)

【在 l********0 的大作中提到】
:
: Applet有数字签名,使用数字签名就可以解决applet的沙箱权限

avatar
l*0
15
对生成的jar文件进行签名
你搜索一下,网上很多资料

【在 k******4 的大作中提到】
:
: 请问是如何数字签名呢 用cacerts对生成的jar文件签名吗
: 还是修改java.policy.applet呢
: 能不能详细说说阿 多谢多谢:)

avatar
g*g
16
Not practical, recommend using web start instead.

【在 l********0 的大作中提到】
: 对生成的jar文件进行签名
: 你搜索一下,网上很多资料

avatar
k*4
17

能不能具体说一说阿 我现在是彻底郁闷了 。。。

【在 g*****g 的大作中提到】
: Not practical, recommend using web start instead.
avatar
s*e
18
basically, by default, applet runs in sandbox. which subjects java security
checks. you can google to see what are limited when loading applet to a
broswer. Signed applet will allow you step out of sandbox.
java web start is a tool to help you efficiently get most recent version of
the application. To do it, you have to configure a jnlp file on the server
side and also you need to add some entry to let your web server (not web
container) regonize the file mime type. to use jws, you have to sign
avatar
k*4
19

security
of
company
enviroment
就像你说的那样 完全搞定啦 多谢!

【在 s******e 的大作中提到】
: basically, by default, applet runs in sandbox. which subjects java security
: checks. you can google to see what are limited when loading applet to a
: broswer. Signed applet will allow you step out of sandbox.
: java web start is a tool to help you efficiently get most recent version of
: the application. To do it, you have to configure a jnlp file on the server
: side and also you need to add some entry to let your web server (not web
: container) regonize the file mime type. to use jws, you have to sign

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。