title: In Install4J is it possible to update the sys.preferredJRE variable?
body: <p>I have an installer whose purpose is updating the max version of a JDK for an existing installation (we require JDK, not JRE), and pointing the existing installation to run with the later version of the JDK (which is user pre-installed and user-specified). </p>
  
  <p>In the installer, I have code that calls JVM.setPreferredJVM() from a directory chooser form component. According to <a href="http://resources.ej-technologies.com/install4j/help/api/" rel="nofollow">the API</a> for JVMSelector, it says this method will "Set the preferred JRE/JDK for your application." According to the <a href="http://resources.ej-technologies.com/install4j/help/doc/index.html" rel="nofollow">help docs</a> on variables (sys.preferredJRE), "This variable will only be set after the "Install files" action has run."</p>
  
  <p>When I run the installer, I see that the setPreferredJVM() method is called, but the sys.preferredJRE is not set to what I wanted, it still references the old JVM. This is a problem because my subsequent "Add VM Options" steps use the sys.preferredJRE variable.</p>
  
  <p>I expected that calling JVMSelector.setPreferredJVM() would update sys.preferredJRE, but it does not. How can I accomplish this so that the user can set the preferred JVM/JDK during the install? </p>