我正在使用 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 后引发的异常的任何提示。
请帮忙!!