When javaws launcher starts up on windows, it loads deployment.properties, then scans the windows registry to find the set of available JRES. For any registered jre that is not in deployment.properties, it invokes it with command: "javaw.exe -classpath deploy.jar com.sun.deploy.panel.JreLocator" to read platform version and product version from standard out.
In JDK9 (where deploy code is compiled with "-target 1.6 -source 1.6) this crashes when the jre being called is 1.5.0 (or earlier).
1.) since we know filter out the unsupported versions (less than 1.6.0) for deployment.properties this is a bigger problem (Though it always was a problem when older version was installed since last deployment code invocation).
2.) Since now we launch javaws app only with the latest version of java, we should not be getting all the jres from the registry any more, but (like unix and mac) only the version of java javaws is run from.
3.) Without doing this at all, when we installed a newer version of the jre, then launched javaws from it, the first time we launched we would use the previous latest jre, instead of launching with the new latest.
The native code does not actually re-write out the deployment.properties file anymore, but just uses the combined list of jres to determine which is the latest.