我已经构建了一个由Java Web Start启动的Java应用程序。
在应用程序的最后阶段,它会将文件上传到我们的服务器。
最近我开始在Mac OSX上崩溃(10.6)。
我从日志中得到了这个:
MRJ Plugin for Mac OS X v1.0.1
[starting up Java Applet Security @ Thu Apr 14 17:58:16 CEST 2011]
Thu Apr 14 17:58:20 CEST 2011 JEP creating applet ScratchApplet (http://scratch.mit.edu/static/misc/)
<<< ProxyClassLoader: defined LiveConnectProxy class. >>>
<<< Here're the permissions you've got: >>>
<<< java.security.Permissions@57b13a (
(java.net.SocketPermission scratch.mit.edu connect,accept,resolve)
)
>>>
Exception in thread "AWT-EventQueue-3" java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at sun.applet.AppletSecurity.checkAccess(AppletSecurity.java:235)
at sun.plugin.security.ActivatorSecurityManager.checkAccess(ActivatorSecurityManager.java:155)
at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:299)
at java.lang.Thread.init(Thread.java:336)
at java.lang.Thread.<init>(Thread.java:564)
at jep.AppletFrame.destroyAppletDirectly1(Unknown Source)
at jep.AppletFrame$Destroy1.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:678)
at java.awt.EventQueue.access$000(EventQueue.java:86)
at java.awt.EventQueue$1.run(EventQueue.java:639)
at java.awt.EventQueue$1.run(EventQueue.java:637)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:653)
at java.awt.EventQueue$2.run(EventQueue.java:651)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:650)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
这告诉它这是一个安全问题。但奇怪的是,我在Windows上没有任何问题,这存在于jnlp文件中:
<security>
<all-permissions/>
</security>
是签名申请。
我怎样才能找到更多关于抛出异常的位置?
我也有可用的故障转储,但我不确定如何插入它。
答案 0 :(得分:1)
检查您的应用是否已正确签名。您可以使用以下命令行测试jar文件:
jarsigner -verify <jarfile>
在Windows和Mac上试试。比较输出以查看它是否在Windows上验证与Mac相同。您需要在JVM的cacerts文件中拥有证书颁发机构的证书。由于Apple负责在Mac上提供Java,因此该文件可能不包含与Windows相同的证书颁发机构,因为它是由Oracle分发的。据推测,在不久的将来,Oracle将在Mac上提供Java,但这可能是问题所在。基本上,您的应用程序没有您所请求的权限,正如您的例外所述。