在ie里面怎么看错误?applet初始化都没问题,就是无法调用服务器

解决方案 »

  1.   

    这应该属于安全限制问题,在appletViewer里面applet是当作本地应用程序的,不受功能限制。但是如果在ie中就要受限制,在网络方面的限制就是只能连接下载这个applet的主机,不能连接其他主机。
    解决方法是给applet做一个签名。
    签名方法如下:
    Signing JAR Files with a Test Certificate
    Here are the steps needed to sign a JAR file with a test certificate: Make sure that you have a JDK 1.2 or JDK 1.3 keytool and jarsigner in your path (located in the J2SE SDK bin directory). Create a new key in a new keystore as follows: 
    keytool -genkey -keystore myKeystore -alias myself 
    You will get prompted for a information about the new key, such as password, name, etc. This will create the myKeystore file on disk. Then, create a self-signed test certificate as follows: 
    keytool -selfcert -alias myself -keystore myKeystore 
    This will prompt for the password. Generating the certificate takes a few minutes. Check to make sure that everything is ok. To list the contents of the keystore, use the command: 
    keytool -list -keystore myKeystore 
    It should list something like: 
    Keystore type: jks
    Keystore provider: SUNYour keystore contains 1 entry:myself, Tue Jan 23 19:29:32 PST 2001, keyEntry,
    Certificate fingerprint (MD5):
    C2:E9:BF:F9:D3:DF:4C:8F:3C:5F:22:9E:AF:0B:42:9DFinally, sign the JAR file with the test certificate as follows: 
    jarsigner -keystore myKeystore test.jar myself 
    Repeat this step on all of your JAR files. 
    访问的时候:
    <applet width="200" height="300" archive="file.jar" code="Download.class">
    </applet>
    但是有个限制,就是访问的机器上一定要安装sun公司的java虚拟机,就是webstart,不安装ie还是没有办法访问的。
      

  2.   

    这种签名方法是sun公司的webstart说明文档里面的,你可以去查查。
      

  3.   

    当我做到这一步时:
    jarsigner -keystore myKeystore vbjorb.jar myself
    出现下面的错误:
    jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry crc-32
    (expected 0xaaf5a674 but got 0x180e78b3)
    另外,我在本机的ie上也需要签名吗?
      

  4.   

    在applet中访问宿主服务器好象不需要签名。 试试看?
      

  5.   

    在本机的ie里也无法运行我的applet,这是为什么?但用appletviewer可以,需要怎么做才可以???
      

  6.   

    在控制台中打开java选项, 在tray中显示java图标.
    然后在运行applet的时候点击图标可以查看错误消息.另外, 远程调试可能会有帮助!
      

  7.   

    我用jdk1.4时,在任务栏是有一个java控制台的图标显示,可以显示错误信息,但是我现在用jdk1.3怎么就没法显示这个图标了,怎么办,如何把它调出来?
      

  8.   

    这是我在java控制台中显示的错误信息:
    com.ms.security.SecurityExceptionEx[com/inprise/vbroker/properties/PropertyManager.<clinit>]: Unable to access system property: java.class.path

    com.ms.security.SecurityExceptionEx[com/inprise/vbroker/properties/CommandLineProcessor.process]: Unable to access system properties.这应该怎么处理,是不是要改安全文件,怎么改?请高手指点!!