JRE 1.7.0.21更新后,Java查看器无法正常工作

时间:2013-04-22 08:47:44

标签: java

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

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

enter image description here

以下是详细信息:

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建议我检查了initialize文件夹中的静态块,看起来问题就在这里:

    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不会抛出错误,但applet不起作用(它没有加载图像)...

由于我没有开发此应用程序,我将非常感谢如何保留此功能并更正新JRE 1.7更新后抛出的异常21。

请帮忙!!

3 个答案:

答案 0 :(得分:6)

尝试使用来自受信任的证书颁发机构的证书对您的applet进行签名。查看here了解更多信息:

  

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

答案 1 :(得分:0)

以下任何一项都是正确的:

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

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

答案 2 :(得分:0)

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

完成。