我刚刚将我的comupters(Windows 8,Windows 7和OS X Mountain Lion)升级到Java 7更新45,我的Java applet不再起作用了。我在控制台中收到以下异常:
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at org.lwjgl.util.applet.AppletLoader.run(AppletLoader.java:906)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError
at org.lwjgl.Sys.createImplementation(Sys.java:124)
at org.lwjgl.Sys.<clinit>(Sys.java:111)
at org.lwjgl.opengl.Display.<clinit>(Display.java:135)
at com.jme.system.lwjgl.LWJGLDisplaySystem.setVSyncEnabled(LWJGLDisplaySystem.java:109)
at cohort.Utilities.CohortApplet.init(CohortApplet.java:105)
at avc.TackFoot3D.AVC_Applet.init(AVC_Applet.java:167)
at org.lwjgl.util.applet.AppletLoader.switchApplet(AppletLoader.java:1330)
at org.lwjgl.util.applet.AppletLoader$2.run(AppletLoader.java:909)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "org.lwjgl.util.Debug" "read")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at java.lang.Boolean.getBoolean(Unknown Source)
at org.lwjgl.LWJGLUtil$4.run(LWJGLUtil.java:454)
at org.lwjgl.LWJGLUtil$4.run(LWJGLUtil.java:452)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.LWJGLUtil.getPrivilegedBoolean(LWJGLUtil.java:452)
at org.lwjgl.LWJGLUtil.<clinit>(LWJGLUtil.java:265)
... 22 more
我无法弄清楚为什么停止工作。显然有一些安全更新破坏了它但我看不出它是什么。所有罐子都使用相同的Thawte证书签名。清单文件都包含“Trusted-Library:true”和“Permissions:all-permissions”属性。我也尝试了codebase属性,但没有做任何事情。我已阅读更新45发行说明,但看不到会导致此行为的任何内容,但显然我遗漏了一些东西。有人可以帮忙吗?
答案 0 :(得分:1)
出现此问题的原因是Java 7 Update 45和LWJGL安全要求之间的兼容性问题......即使LWJGL网站(http://lwjgl.org/applet/)和Nvidia网站上的applet也停止工作......
对于用户匆忙的这个问题的临时修复是实际修改LWJGL库和applet加载器以允许运行applet而不考虑安全措施......这是一项麻烦的任务,并且安全性不可靠观点
对此的永久性修复是等到LWJGL发布更新,因为最新更新是“LWJGL 2.9.0”2013年4月21日星期日,即更新45之前,即使在此修复之后,此问题也可能再次出现2014年2月14日的下一次Java更新,因为它是一个重大更新,可能包含更多安全措施...
答案 1 :(得分:0)
您可能想尝试使用u25 - 使用调用和事件队列打破了很多东西。换句话说,我认为这可能与此错误有关,而不是更新45.
NullPointerException in invokeLater while running through Java Webstart