We need you!

Icon

The IzPack documentation needs work, and you are invited to edit it!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


IzPack 5.0 and later:

${SYSTEM[variable.name]}

More examples, provided -Dfeature.Enabled=true is added to launching the installer on the command line:

Code Block
titleExample 1
languagexml
<variables>
  <variable name="featureEnabled" value="${SYSTEM[feature.Enabled]}" />
</variables>

<conditions>
  <condition type="variable" id="isFeatureEnabled">
    <name>featureEnabled</name>
    <value>true</value>
  </condition>
</conditions>

...


${SYSTEM_variable_name}

If the variable name contains '.' characters they got to be replaced by '_' here.

More examples, provided -Dfeature.Enabled=true is added to launching the installer on the command line:

Code Block
titleExample 1
languagexml
<variables>
  <variable name="featureEnabled" value="${SYSTEM_feature_Enabled}" />
</variables>

<conditions>
  <condition type="variable" id="isFeatureEnabled">
    <name>featureEnabled</name>
    <value>true</value>
  </condition>
</conditions>

...

For Izpack before 5.0.0-rc2, no substitution happens if the specified system variable cannot be found in the execution environment. This means that the string ${SYSTEM_java_version} gets inserted into the output as a literal string, instead of being replaced by the value of the java.version environment variable. real substitution on demand happens but all system properties known to the JVM are added as IzPack variables by default when the installer starts.