Property Substitution

Property substitution allows customizing tc Runtime instances by providing instance-specific values at creation time. The tcruntime-instance script scans for property place holders in files and substitutes a value that is derived from a default or another defined property, or supplied interactively by the user when the script is run with the --interactive option. Property substitution occurs in the bin/ file, XML configuration fragments, the logging properties fragment, and all .properties files.

The syntax for a place holder is as follows:


Implicit Properties

Templates are provided a set of implicit properties, determined at instance creation time. They are generally specific to the platform where the instance is created and the JAVA_HOME the instance will use at runtime. The list of implicit properties and their possible values are shown in the following table.

Table 34. Implicit Properties

PropertyPossible Values
  • unix

  • windows

  • x64

  • x86
  • hotspot

  • j9





Configuration Prompts

When a user runs the instance creation script in interactive mode, the script prompts for any property not specified as part of the command. The standard prompt is Please enter a value for '%s'. Default '%s': when a default is provided and Please enter a value for '%s': when no default is provided. These prompts are generic and not good at helping the user select a useful value. You can provide more helpful custom prompt text. To do this, a template must contain a resource bundle called in the root of the template. This bundle contains the text to display when prompting for a value. In addition, the prompt can include the default value for the property by embedding the ${default} place holder in the text. For example: the path to the VMware tools installation. The default path is '${default}'\:

The template user accepts the default by pressing Enter without entering a value.

Configuration prompts can be localized for particular languages and countries. To do this, append language and country codes to the file name. For example, a resource bundle containing localized prompts for Spanish speakers would be called