在Java 8中使用ConcurrentSkipListSet时“拒绝访问”

在Java 8中使用ConcurrentSkipListSet时“拒绝访问”,java,securityexception,accesscontrolexception,Java,Securityexception,Accesscontrolexception,我正在使用Java 8u20在沙盒小程序中执行以下操作: Set<Integer> set = new ConcurrentSkipListSet<Integer>(); set.add((int) 1); 我得到以下例外情况: network: Cacheeintrag nicht gefunden [URL: http://[0:0:0:0:0:0:0:1]:80/crossdomain.xml, Version: null] network: Verbindung

我正在使用Java 8u20在沙盒小程序中执行以下操作:

Set<Integer> set = new ConcurrentSkipListSet<Integer>();
set.add((int) 1);
我得到以下例外情况:

network: Cacheeintrag nicht gefunden [URL: http://[0:0:0:0:0:0:0:1]:80/crossdomain.xml, Version: null]
network: Verbindung von http://[0:0:0:0:0:0:0:1]:80/crossdomain.xml mit Proxy=DIRECT wird hergestellt
network: Verbindung von http://[0:0:0:0:0:0:0:1]:80/ mit Proxy=DIRECT wird hergestellt

java.lang.SecurityException: denied access outside a permitted URL subpath
 at sun.net.www.protocol.http.HttpURLConnection.checkURLFile(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
 at com.sun.deploy.net.CrossDomainXML.check(Unknown Source)
 at com.sun.deploy.net.CrossDomainXML.check(Unknown Source)
 at sun.plugin2.applet.SecurityManagerHelper.checkConnectHelper(Unknown Source)
 at sun.plugin2.applet.AWTAppletSecurityManager.checkConnect(Unknown Source)
 at java.net.NetworkInterface$1checkedAddresses.<init>(Unknown Source)
 at java.net.NetworkInterface.getInetAddresses(Unknown Source)
 at java.net.NetworkInterface.getHardwareAddress(Unknown Source)
 at java.util.concurrent.ThreadLocalRandom.initialSeed(Unknown Source)
 at java.util.concurrent.ThreadLocalRandom.<clinit>(Unknown Source)
 at java.util.concurrent.ConcurrentSkipListMap.doPut(Unknown Source)
 at java.util.concurrent.ConcurrentSkipListMap.putIfAbsent(Unknown Source)
 at java.util.concurrent.ConcurrentSkipListSet.add(Unknown Source)
 at myCode...

Caused by: java.security.AccessControlException: access denied ("java.net.SocketPermission" "[0:0:0:0:0:0:0:1]:80" "connect,resolve")
 at java.security.AccessControlContext.checkPermission(Unknown Source)
 at java.security.AccessController.checkPermission(Unknown Source)
 at java.lang.SecurityManager.checkPermission(Unknown Source)
 at java.lang.SecurityManager.checkConnect(Unknown Source)
 at sun.plugin2.applet.SecurityManagerHelper.checkConnectHelper(Unknown Source)
 at sun.plugin2.applet.AWTAppletSecurityManager.checkConnect(Unknown Source)
 ... 20 more
问题:

这个奇怪的地址是什么[0:0:0:0:0:0:0:1]:80? 有解决办法吗? 我如何向Java报告这个bug,或者已经有关于这个bug的报告了吗? 对于具有类似并发行为的ConcurrentSkipListSet,有什么好的替代方案? 可能:Collections.newSetFromMapnew ConcurrentHashMap?
作为解决方案,您可以通过反射到ThreadLocalRandomlocalRandomI中来初始化自己的随机实例,我正在沙箱中运行。大多数反射函数是不可能的。此外,我无法访问ThreadLocalRandomlocalRandom,因为初始化类ThreadLocalRandom.java bug跟踪时会发生错误。与您的问题无关我发现以下错误:可能与您的问题有关?我在Java8中有.add方法失败,但在Java7中没有,我有点不知所措。我正在开发的软件非常依赖于这段代码。人们不会期望Java的某些部分会无缘无故地崩溃。