有的机器没问题.证明Applet没问题,是不是有的IE的安全级别太高了,或者没有启用JVM啊?

解决方案 »

  1.   

    你运行的是什么类型的applet呢,怎么会connection refused呢?
    applet有些操作确实是受限制的,除非加入认证机制
      

  2.   

    那是因为各个机器上的Applet安全权限不同,用policytool配置一下,在命令窗口输入policytool就可以进入,参考那些没问题的机器来配置。
      

  3.   

    你的applet是不是违反了安全限制了还是作了数字签名? 要不就是你的IE拒绝所有的activeX控件运行
      

  4.   

    可能和IE设置有关,或者是改一下C:\Program Files\Java\j2re1.4.0_01\lib\security\java.policy文件。
      

  5.   

    修改{user.home}/lib/security/java.security,让它的url指向服务器上的java.policy文件,这样会比较安全一点
      

  6.   

    可问题是所有的机器上的JRE或者什么policy文件都没有动过的.
      

  7.   

    [email protected]
    请在mail中也详细说明使用的方法好么?或者告诉我该看什么文章.
    谢谢......呜呜,你是好人!!!!
      

  8.   

    签名很简单:Topic:  Digital certificates for appletsQuestion:  How can I create a digital certificate and sign an applet? Answer:These steps describe the creation of a self-signed applet. This is useful for testing purposes. For use of public reachable applets, there will be needed a "real" certificate issued by an authority like VeriSign or Thawte. (See Step 10 - no user will import and trust a self-signed applet from an unkown developer). The applet needs to run in the plugin, as only the plugin is platform- and browser-independent. And without this independence, it doesn't make sense to use Java programming... Create your code for the applet as usual. It is not necessary to set any permissions or use security managers in the code.Install JDK 1.3 path for use of the following commands: jdk 1.3 path\bin\ Commands are keytool, jar, jarsigner. Password for the keystore is any password. Only Sun knows why... perhaps ;-)Generate key:  keytool -genkey -keyalg rsa -alias tstkey Enter keystore 
     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. 
      

  9.   

    可问题是所有的机器上的JRE或者什么policy文件都没有动过的.
    问题就是因为policy没有动过,Applet的权限不够导致的,也就是说Applet默认配置是不可以连接除本机以为的socket的
      

  10.   

    如果不增加applet的权限,applet无法与除本机以外的任何socket,懂否?
      

  11.   

    我也碰到了同样的问题,我的applets在有的机上可以安全运行,jvm的安全级别为高,而我的安全级别为自定义且给了所有的权限才能运行一部分,都快把我气疯了,那位大大给帮忙想想(applets 主要用在notes下下载doc文档)
      

  12.   

    grant {
      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其实包含了前面一个的,不过后面一个最好不要加
      

  13.   

    上面几句的IP是你需要连接服务器地址,如果很多,好像我记得可以用"*"代替任何IP,如果不行就用后面一句,也就是说加了
    grant{
    permission java.security.AllPermission;
    };
    在你的java.policy文件里面,applet就可以做任何事情了,包括删除文件,连接服务器等等,你试试看把
      

  14.   

    已经搞定了.简直要气疯了.原因是:.......
    我在国际化支持时把根文件删掉了,只留了_zh和_en的文件.
    因为我代码里保证了只有中文和E文两种.
    可是人家很菜啦,不知道一定要取一次根文件(没有后缀的那种).
    用sniffer看到在使用http获取这些根文件,结果就是401.然后呢,输入的密码就不被认可,所以就要再输.......大致上就是这样.
    呜呜,我真白痴.