You can configure the Java properties by defining the JBP_CONFIG_JAVA_OPTS environment variable.
Defining the JBP_CONFIG_JAVA_OPTS environment variable in the manifest.yml file of the application.
manifest.yml
--- applications: - name: <app-name> memory: 512M ... env: JBP_CONFIG_JAVA_OPTS: 'java_opts: ''-DtestJBPConfig=^%PATH^% -DtestJBPConfig1="test test" -DtestJBPConfig2="%PATH%"'''
Defining the JBP_CONFIG_JAVA_OPTS environment variable by using the cf set-env command of the Cloud Foundry Command Line Interface (cf CLI).
cf set-env myapp JBP_CONFIG_JAVA_OPTS "[java_opts: '-DtestJBPConfig=^%PATH^% -DtestJBPConfig1=\"test test\" -DtestJBPConfig2=\"^%PATH^%\"']"
A single quote ['] is used to enclose the JBP_CONFIG_JAVA_OPTS environment variable in the manifest.yml file. Strings containing the following characters must be quoted: [:], [{], [}], [[], []], [,], [&], [*], [#], [?], [|], [-], [<], [>], [=], [!], [%], [@], [\].
When a single quote ['] is used, other single quotes ['] in the string must be escaped by doubling it [''].
The string must be enclosed in the double quotes ["]. If there are other double quotes in the string, you have escape them using the backslash [\].
In case you need to specify a option value, which has blank spaces in it, you need to surround it with quotes ["]. If the value contains special characters like for example [$], you have to escape them using the escape character specific for the operating system shell where the application is pushed. In the example below the [$] in the $PATH string is escaped using the [\] escape character for Linux. Otherwise, if the [$] sign is not escaped, the value of the variable PATH is substituted in the property value.
manifest.yml
--- applications: - name: <app-name> memory: 512M ... env: JBP_CONFIG_JAVA_OPTS: 'java_opts: ''-DtestJBPConfig=\$PATH -DtestJBPConfig1="test test" -DtestJBPConfig2="$PATH"'''