cancel
Showing results for 
Search instead for 
Did you mean: 

Specifying a Valid VM List for a Pure Java Installer

Specifying a Valid VM List for a Pure Java Installer

Summary

This article goes over why the Valid VM List will not work with a pure Java installer and provides a workaround for this limitation

Synopsis

You can specify a list of Java Virtual Machines for the installer to run with under the Project > JVM Settings > Installer Settings > Valid VM list setting. However, this setting will only affect the launcher for the installer. When selecting the Other Java-Enabled Platforms build target, a pure Java installer will get created, in which case a launcher will not be used. As a result, launcher-specific settings will not affect a pure java installer. To limit a pure Java installer to only run on certain JVMs, refer to the discussion below.

Discussion

The following example outlines how to set a "valid VM list" for an installer to run only on Java 7 and Java 8:
  1. In the project, go to Project > Rules and add a "Compare InstallAnywhere Variables" Rule
  2. Set the properties of the Rule as follows:
    Operand 1 = $prop.java.version$containsOperand 2 = 1.7
  3. Add another "Compare InstallAnywhere Variables" Rule
  4. Set the properties of the Rule as follows:
    Operand 1 = $prop.java.version$containsOperand 2 = 1.8
  5. Modify the Rule expression to 'OR' the Rule ID's.
  • EX: CIAV111 || CIAV222 (Where CIAV# are the ID's designated for each rule added)
What this rule expression will do is check that the Java System Property, java.version contains 1.7 or 1.8. If the System Property does not contain either string, the installer will display the message specified in the Message to Display if Installer Rules Fail field then exit the installation.

Additional Information

Installer Rules View

Rules Reference

Building Complex Rule Expressions
Labels (1)
Was this article helpful? Yes No
No ratings