1

我正在使用 java 查看器(小程序)在我的 .NET 应用程序中查看图像。

它一直工作到最新的 JRE 更新。每个更新 java 的客户端都抛出以下错误(在所有浏览器中):

在此处输入图像描述

以下是详细信息:

Java Plug-in 10.21.2.11 Using JRE version 1.7.0_21-b11 Java
HotSpot(TM) Client VM User home directory = C:\Documents and
Settings\Administrator
---------------------------------------------------- c:   clear console window f:   finalize objects on finalization queue g:  
garbage collect h:   display this help message l:   dump classloader
list m:   print memory usage o:   trigger logging q:   hide console r:
reload policy configuration s:   dump system and deployment properties
t:   dump thread list v:   dump thread stack x:   clear classloader
cache 0-5: set trace level to <n>
----------------------------------------------------
                Match: beginTraversal Match: digest selected JREDesc: JREDesc[version 1.4+, heap=-1--1, args=-Xmx512m
-Dsun.security.ssl.allowUnsafeRenegotiation=true, href=http://java.sun.com/products/autodl/j2se, sel=false, null, null],
JREInfo: JREInfo for index 0:
    platform is: 1.7
    product is: 1.7.0_21
    location is: http://java.sun.com/products/autodl/j2se
    path is: C:\Program Files\Java\jre7\bin\javaw.exe
    args is: 
    native platform is: Windows, x86 [ x86, 32bit ]
    JavaFX runtime is: JavaFX 2.2.21 found at C:\Program Files\Java\jre7\
    enabled is: true
    registered is: true
    system is: true

                Match: ignoring maxHeap: -1
                Match: ignoring InitHeap: -1
                Match: digesting vmargs: -Xmx512m -Dsun.security.ssl.allowUnsafeRenegotiation=true
                Match: digested vmargs: [JVMParameters: isSecure: false, args: -Xmx512m
-Dsun.security.ssl.allowUnsafeRenegotiation=true]
                Match: selecting maxHeap(2): 536870912
                Match: JVM args after accumulation: [JVMParameters: isSecure: false, args:
-Dsun.security.ssl.allowUnsafeRenegotiation=true]
                Match: digest LaunchDesc: null
                Match: digest properties: []
                Match: JVM args: [JVMParameters: isSecure: false, args: -Dsun.security.ssl.allowUnsafeRenegotiation=true]
                Match: endTraversal ..
                Match: JVM args final: -Xmx512m -Dsun.security.ssl.allowUnsafeRenegotiation=true
                Match: Running JREInfo Version    match: 1.7.0.21 == 1.7.0.21
                Match: Running JVM args match the secure subset: have:<-Xmx512m>  satisfy want:<-Xmx512m
-Dsun.security.ssl.allowUnsafeRenegotiation=true>
                Match: beginTraversal Match: digest selected JREDesc: JREDesc[version 1.4+, heap=-1--1, args=-Xmx512m
-Dsun.security.ssl.allowUnsafeRenegotiation=true, href=http://java.sun.com/products/autodl/j2se, sel=false, null, null],
JREInfo: JREInfo for index 0:
    platform is: 1.7
    product is: 1.7.0_21
    location is: http://java.sun.com/products/autodl/j2se
    path is: C:\Program Files\Java\jre7\bin\javaw.exe
    args is: 
    native platform is: Windows, x86 [ x86, 32bit ]
    JavaFX runtime is: JavaFX 2.2.21 found at C:\Program Files\Java\jre7\
    enabled is: true
    registered is: true
    system is: true

                Match: ignoring maxHeap: -1
                Match: ignoring InitHeap: -1
                Match: digesting vmargs: -Xmx512m -Dsun.security.ssl.allowUnsafeRenegotiation=true
                Match: digested vmargs: [JVMParameters: isSecure: false, args: -Xmx512m
-Dsun.security.ssl.allowUnsafeRenegotiation=true]
                Match: selecting maxHeap(2): 536870912
                Match: JVM args after accumulation: [JVMParameters: isSecure: false, args:
-Dsun.security.ssl.allowUnsafeRenegotiation=true]
                Match: digest LaunchDesc: null
                Match: digest properties: []
                Match: JVM args: [JVMParameters: isSecure: false, args: -Dsun.security.ssl.allowUnsafeRenegotiation=true]
                Match: endTraversal ..
                Match: JVM args final: -Xmx512m -Dsun.security.ssl.allowUnsafeRenegotiation=true
                Match: Running JREInfo Version    match: 1.7.0.21 == 1.7.0.21
                Match: Running JVM args match the secure subset: have:<-Xmx512m>  satisfy want:<-Xmx512m
-Dsun.security.ssl.allowUnsafeRenegotiation=true>

正如 jatin 建议的那样,我检查了初始化文件夹中的静态块,看起来问题出在这里:

    static { 
    // This gets rid of exception for not using native acceleration
    System.setProperty("com.sun.media.jai.disableMediaLib", "true");
    System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", "true");
} 

我评论了这一行,现在java没有抛出错误,但小程序不起作用(它没有按应有的方式加载图像)......

由于我没有开发此应用程序,因此我将不胜感激有关如何保留此功能并更正新 JRE 1.7 更新 21 后引发的异常的任何提示。

请帮忙!!

4

3 回答 3

6

尝试使用来自受信任的证书颁发机构的证书对您的小程序进行签名。在这里查看更多信息:

从 2013 年 4 月的 Java SE 7 Update 21 开始,所有 Java Applet 和 Web Start 应用程序都应使用受信任的证书进行签名。

于 2013-04-26T14:14:52.940 回答
0

转到控制面板,打开 Java 控制面板,转到安全选项卡并将其降低。

完毕。

于 2013-06-28T20:05:58.487 回答
0

以下是否属实:

1) 使用 SSL 的 Web 服务器(上面的输出看起来是真的,只是想确认一下) 2) Web 服务器 FQDN 与地址栏中 URL 中的主机名不匹配(即,使用 DNS 别名)

如果 2 为真,那么在地址栏中使用 FQDN 而不是别名时是否有效?

于 2013-04-25T13:40:50.667 回答