Duplicate :
|
test env: jre8 b29, 32bit winxp For code coverage purpose, we need to pass some vars to jvm when launching app. But I found if there is no deployment.properties file, it will be stuck in "C:\Program Files\Java\jre8\bin\javaw.exe" -classpath "C:\\Program Files\\Java\\jre8\\lib\\deploy.jar" com.sun.deploy.panel.JreLocator Steps to reproduce: 1) rdp to leexlee.cn.oracle.com duke/hello 2) delete the deployment.properties file if it exists 3) cd to dir L:/tmp, then execute java ProcessBuilderTest This app launches a jnlp with ProcessBuilder and pass _JAVA_OPTIONS with -javaagent value to it. 4) if the app can't be lauched and ps -ef | grep java, shows that it gets stuck in "C:\Program Files\Java\jre8\bin\javaw.exe" -classpath "C:\\Program Files\\Java\\jre8\\lib\\deploy.jar" com.sun.deploy.panel.JreLocator the issue is reproduced. if we launch any jnlp application before running ProcessBuilderTest to create a deployment.properties file, the app can be launched successfully. Source code has been attached, it uses jcov.jar in http://rehte.cn.oracle.com:8080/wshost/new_framework/new_framework/CodeCoverage/lib/jcov.jar You can download the jcov.jar file, modify the path in ProcessBuilderTest.java and try it on your machine.