java jnlp被阻止_JNLP应用程序Web服务访问被拒绝 - java.io.FilePermission
我的jnlp應用程序有問題 . 所有jar都使用可信證書簽名,在主jar中有Codebase *和Permissions屬性 . 在jnlp文件中有大約130個簽名的jar,并且JNLP中的權限設置為 . 我有窗口:應用程序因安全性而被阻止:
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Users\artur\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\46\254523ee-26b31f3f" "read"):
com.sun.deploy.security.BlockedException: Your security settings have blocked an application from running due to missing a "Permissions" manifest attribute in the main jar.
at com.sun.deploy.security.BlockedDialog.show(Unknown Source)
at com.sun.deploy.security.TrustDecider.validateChain(Unknown Source)
at com.sun.deploy.security.TrustDecider.isAllPermissionGrantedInt(Unknown Source)
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
at com.sun.deploy.security.DeployURLClassLoader.getResourcePermission(Unknown Source)
at com.sun.deploy.security.DeployURLClassLoader.getResourceAsStream(Unknown Source)
at javax.xml.bind.ContextFinder.find(Unknown Source)
at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
at com.sun.xml.internal.ws.assembler.MetroConfigLoader$3.run(Unknown Source)
at com.sun.xml.internal.ws.assembler.MetroConfigLoader$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.internal.ws.assembler.MetroConfigLoader.createJAXBContext(Unknown Source)
at com.sun.xml.internal.ws.assembler.MetroConfigLoader.loadMetroConfig(Unknown Source)
at com.sun.xml.internal.ws.assembler.MetroConfigLoader.init(Unknown Source)
at com.sun.xml.internal.ws.assembler.MetroConfigLoader.(Unknown Source)
at com.sun.xml.internal.ws.assembler.TubelineAssemblyController.getTubeCreators(Unknown Source)
at com.sun.xml.internal.ws.assembler.MetroTubelineAssembler.createClient(Unknown Source)
at com.sun.xml.internal.ws.client.Stub.createPipeline(Unknown Source)
at com.sun.xml.internal.ws.client.Stub.(Unknown Source)
at com.sun.xml.internal.ws.client.Stub.(Unknown Source)
at com.sun.xml.internal.ws.client.Stub.(Unknown Source)
at com.sun.xml.internal.ws.client.sei.SEIStub.(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getStubHandler(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(Unknown Source)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(Unknown Source)
at javax.xml.ws.Service.getPort(Unknown Source)
Caused by: java.security.AccessControlException: access denied ("java.io.FilePermission" "C:\Users\artur\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\46\254523ee-26b31f3f" "read")
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at com.sun.javaws.security.JavaWebStartSecurity.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.util.zip.ZipFile.(Unknown Source)
at java.util.zip.ZipFile.(Unknown Source)
at java.util.jar.JarFile.(Unknown Source)
at java.util.jar.JarFile.(Unknown Source)
at com.sun.deploy.util.JarUtil.createJarFile(Unknown Source)
at com.sun.deploy.security.TrustDecider.checkMainJarManifest(Unknown Source)
這是主要的jar清單:
Build-Jdk:1.8.0_161權限:所有權限Main-Class:path.to.Launcher Codebase:*
這是jnlp:
MyApplicationApp
獲取端口的代碼:
@WebEndpoint(name = "XKMSPort")
public XKMSPortType getXKMSPort() {
return super.getPort(new QName("http://www.w3.org/2002/03/xkms#wsdl", "XKMSPort"), XKMSPortType.class);
應用程序正在運行jre 8.是否有可能強制應用程序在沒有阻塞窗口的情況下運行?
總結
以上是生活随笔為你收集整理的java jnlp被阻止_JNLP应用程序Web服务访问被拒绝 - java.io.FilePermission的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java 访问私有成员,在Java中访问
- 下一篇: java根据文件路径读取文件_java根