8

更新最新的 JRE (1.7.0_25) 后,我的应用程序不会像以前那样从 webstart 启动。我没有部署任何更新的 jar 文件或更改 Web 服务器上的 JNLP 文件,但我无法从 webstart 启动应用程序。它在 IDE 和本地 jar 执行中运行良好

我试图在控制面板的高级选项卡中禁用所有证书检查等,但错误仍然存​​在,我不确定这是否与最新 JRE 中的新安全设置有关,或者是否有其他更改(可能在网络上服务器?)我不控制 Web 服务器我只有一个发布应用程序的页面,并且可以访问 jar 文件的驱动器位置、驱动器位置的权限等。我现在不知道什么问题是!我尝试退出罐子并验证签名

我感谢人们可以提供的任何帮助!完整错误如下:

            java.lang.NoClassDefFoundError: Could not initialize class sun.security.ec.SunEC
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
                at java.lang.reflect.Constructor.newInstance(Unknown Source)
                at java.lang.Class.newInstance(Unknown Source)
                at sun.security.jca.ProviderConfig$2.run(Unknown Source)
                at sun.security.jca.ProviderConfig$2.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at sun.security.jca.ProviderConfig.doLoadProvider(Unknown Source)
                at sun.security.jca.ProviderConfig.getProvider(Unknown Source)
                at sun.security.jca.ProviderList.getProvider(Unknown Source)
                at sun.security.jca.ProviderList.getService(Unknown Source)
                at sun.security.jca.GetInstance.getInstance(Unknown Source)
                at java.security.Security.getImpl(Unknown Source)
                at java.security.AlgorithmParameters.getInstance(Unknown Source)
                at sun.security.x509.AlgorithmId.decodeParams(Unknown Source)
                at sun.security.x509.AlgorithmId.<init>(Unknown Source)
                at sun.security.x509.AlgorithmId.parse(Unknown Source)
                at sun.security.x509.X509Key.parse(Unknown Source)
                at sun.security.x509.CertificateX509Key.<init>(Unknown Source)
                at sun.security.x509.X509CertInfo.parse(Unknown Source)
                at sun.security.x509.X509CertInfo.<init>(Unknown Source)
                at sun.security.x509.X509CertImpl.parse(Unknown Source)
                at sun.security.x509.X509CertImpl.<init>(Unknown Source)
                at sun.security.provider.X509Factory.engineGenerateCertificate(Unknown Source)
                at java.security.cert.CertificateFactory.generateCertificate(Unknown Source)
                at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source)
                at sun.security.provider.JavaKeyStore$JKS.engineLoad(Unknown Source)
                at java.security.KeyStore.load(Unknown Source)
                at com.sun.deploy.security.RootCertStore$1.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                at com.sun.deploy.security.RootCertStore.loadCertStore(Unknown Source)
                at com.sun.deploy.security.RootCertStore.load(Unknown Source)
                at com.sun.deploy.security.RootCertStore.load(Unknown Source)
                at com.sun.deploy.security.ImmutableCertStore.load(Unknown Source)
                at com.sun.deploy.security.LazyRootStore.loadJREStore(Unknown Source)
                at com.sun.deploy.security.LazyRootStore.getTrustAnchors(Unknown Source)
                at com.sun.deploy.security.TrustDecider.getValidationState(Unknown Source)
                at com.sun.deploy.security.TrustDecider.validateChain(Unknown Source)
                at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)
                at com.sun.javaws.security.AppPolicy.grantUnrestrictedAccess(Unknown Source)
                at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResourcesHelper(Unknown Source)
                at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResources(Unknown Source)
                at com.sun.javaws.Launcher.prepareResources(Unknown Source)
                at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
                at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
                at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
                at com.sun.javaws.Launcher.launch(Unknown Source)
                at com.sun.javaws.Main.launchApp(Unknown Source)
                at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
                at com.sun.javaws.Main.access$000(Unknown Source)
                at com.sun.javaws.Main$1.run(Unknown Source)
                at java.lang.Thread.run(Unknown Source)
4

1 回答 1

1

即使您按照所示的jar 签名对 jar 进行了签名,您也将无法在浏览器中运行您的小程序。完成签名后,您应该使用 policytool.exe 在活动 jdk/jre 的 java.polcy 中添加 sun.security.ec.SunEC 类的访问权限。确保以管理员身份运行 policytool.exe,以便您可以修改 java.policy 文件。您必须为 grant codeBase "file:${{java.ext.dirs}}/*" { permission java.security.AllPermission; 添加一个条目 }; 正如马特 C 建议的那样。

于 2015-05-22T08:31:03.483 回答