我想弄清楚一些遗留代码在做什么.这条线到底在做什么,为什么我会这样需要呢?
String lineSeparator = (String) java.security.AccessController.doPrivileged(
new sun.security.action.GetPropertyAction("line.separator"));
Run Code Online (Sandbox Code Playgroud)
我在Weblogic 8上运行的web/ejb应用程序的logger实现中找到了它.据我所知,没有启用特殊的安全策略.(我不喜欢从sun.*包中导入,所以我想摆脱这条线;-)
我们对我的客户端在Safari中遇到Java安全性异常的原因一无所知.有人可以帮忙吗?
在Windows上的Safari中可靠地发生异常.这涉及Java applet.Windows Vista上的Firefox和IE8也会出现异常.
以下是重现的步骤:
在Windows上打开Safari
点击"自定义"(在屏幕底部)
加载"Instant Proof"页面后,单击"添加到购物车".
完整堆栈跟踪:
java.security.AccessControlException: access denied (java.net.SocketPermission www.cengraving.com 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.plugin.security.ActivatorSecurityManager.checkConnect(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at com.designapplet.a.f.a(Unknown Source)
at com.designapplet.ui.c.a(Unknown Source)
at com.designapplet.ui.c.for(Unknown Source)
at com.designapplet.ui.DesignApplet.buy(Unknown Source)
at …Run Code Online (Sandbox Code Playgroud)