有的机器没问题.证明Applet没问题,是不是有的IE的安全级别太高了,或者没有启用JVM啊?
解决方案 »
- 关于pdf解析的问题
- 在linux下使用jnotify:wrong ELF class : ELFCLASS32
- this 和super 的疑问
- swing Graphics2D图形缩放(如一个矩形或一条曲线)
- 在线等高手,高手,如何用Java验证当前用户的Windows,XP,登陆密码?
- hibernate 处理BLOB字段的时候转换异常!在线等!
- 我有两个类一个是ActionForm一个是pojo,这两个类里的数据完全相同,想要两个类中数据呼唤用get,set方法一个一个的写太麻烦,有没有什么
- 怎样编译包中的类?
- 返回Vector的错误!!
- 怎样在按了单选按钮以后,读取另一个.class文件?
- 打算做一个据于Web的报表打印工具,请给出你的意见?!
- 用jbuilder6怎么开发bmp?
applet有些操作确实是受限制的,除非加入认证机制
请在mail中也详细说明使用的方法好么?或者告诉我该看什么文章.
谢谢......呜呜,你是好人!!!!
password: *******
What is your first and last name?
[Unknown]: Your Name What is the name of
your organizational unit?
[Unknown]: YourUnit What is the name of your organization?
[Unknown]: YourOrg What is the name of your
City or Locality?
[Unknown]: YourCity What is the name of
your State or Province?
[Unknown]: YS What is the two-letter country
code for this unit
[Unknown]: US Is CN=Your Name, OU=YourUnit, O=YourOrg,
L=YourCity, ST=YS, C=US correct? [no]: yes (wait...) Enter key password for tstkey (RETURN if same
as keystore password): (press [enter])
Export key: keytool -export -alias tstkey -file tstcert.crt
Enter keystore password: ******* Certificate stored in file tstcert.crt Create JAR: jar cvf tst.jar tst.class Add all classes used in your project by typing the classnames in the same line. added manifest adding: tst.class(in = 849) (out= 536)(deflated 36%) Verify JAR: jar tvf tst.jar 0 Thu Jul 27 12:58:28 GMT+02:00 2000 META-INF/ 68 Thu Jul 27 12:58:28 GMT+02:00 2000 META-INF/MANIFEST.MF 849 Thu Jul 27 12:49:04 GMT+02:00 2000 tst.class Sign JAR: jarsigner tst.jar tstkey Enter Passphrase for keystore: ******* Verifiy Signing: jarsigner -verify -verbose -certs tst.jar130 Thu Jul 27 13:04:12 GMT+02:00 2000 META-INF/MANIFEST.MF 183 Thu Jul
27 13:04:12 GMT+02:00 2000 META-INF/TSTKEY.SF 920 Thu Jul 27
13:04:12 GMT+02:00 2000 META-INF/TSTKEY.RSA 0 Thu Jul 27
12:58:28 GMT+02:00 2000 META-INF/ smk 849 Thu Jul 27
12:49:04 GMT+02:00 2000 tst.class X.509, CN=Your Name, OU=YourUnit, O=YourOrg, L=YourCity, ST=YS, C=US (tstkey) s = signature was verified m = entry is listed in manifest k = at least one certificate was found in keystore i = at least one certificate was found in identity scope jar verified. > Create HTML-File for use of the applet by the Sun Plugin 1.3 (recommended to use HTML Converter Version 1.3) Place a link to the .crt file (created in step 4) in the HTML-File. This .crt file has to be opened by the browser and has to be set to trusted, as the root CA for testing is not known to the browser. For use with "real" certificates, this step should not be necessary.
问题就是因为policy没有动过,Applet的权限不够导致的,也就是说Applet默认配置是不可以连接除本机以为的socket的
permission java.net.SocketPermission "152.168.4.90", "accept, connect, listen, resolve";
permission java.net.SocketPermission "196.168.1.132", "accept, connect, listen, resolve";
permission java.net.SocketPermission "196.168.1.32", "accept, connect, listen, resolve";
permission java.net.SocketPermission "196.168.1.131", "accept, connect, listen, resolve";
};grant{
permission java.security.AllPermission;
};
把你的java.policy 文件里面添加上面几句,不过后面一个grant其实包含了前面一个的,不过后面一个最好不要加
grant{
permission java.security.AllPermission;
};
在你的java.policy文件里面,applet就可以做任何事情了,包括删除文件,连接服务器等等,你试试看把
我在国际化支持时把根文件删掉了,只留了_zh和_en的文件.
因为我代码里保证了只有中文和E文两种.
可是人家很菜啦,不知道一定要取一次根文件(没有后缀的那种).
用sniffer看到在使用http获取这些根文件,结果就是401.然后呢,输入的密码就不被认可,所以就要再输.......大致上就是这样.
呜呜,我真白痴.