当前位置:   article > 正文

java web start launcher,Java版本7u45(NPE)后Java web start不起作用

java web start launcher连接失败

Our java application is launchend via java web start (with glassfish 4.0). After updating to java 7u45, it doesn't work anymore. Here is the error message:

java.lang.NullPointerException

at java.io.StringReader.(Unknown Source)

at org.glassfish.appclient.client.JWSAppClientContainerMain.insertMaskingLoader(JWSAppClientContainerMain.java:186)

at org.glassfish.appclient.client.JWSAppClientContainerMain.main(JWSAppClientContainerMain.java:132)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.sun.javaws.Launcher.executeApplication(Unknown Source)

at com.sun.javaws.Launcher.executeMainClass(Unknown Source)

at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)

at com.sun.javaws.Launcher.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

This happens right after the download finished. After a quick look into the GF source file, it seems that the property loader.config is not defined as the second line throws the NPE:

final String loaderConfig = System.getProperty("loader.config");

StringReader sr = new StringReader(loaderConfig);

EDIT

The above two code lines where the NPE happens is Glassfish code, from the Class JWSAppClientContainerMain in the jar gf-client-module.jar. It worked until java update 45.

解决方案

As of Update 45, JavaWebstart will no longer pass insecure properties to your application. All properties that are not prefixed with jnlp or javaws are considered insecure.

You either need to change loader.config to jnlp.loader.config (both in the JNLP as well as your java code), or you need to sign the JNLP (place an exact copy of your JNLP in

JNLP-INF/APPLICATION.JNLP inside your jar and sign the jar).

According to this OpenJDK Bugreport this is an intentional change to resolve a security

vulnerability

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/632862
推荐阅读
相关标签
  

闽ICP备14008679号