Specify arguments for Java. Depending on the JVM being used, arguments are specified differently. Arguments can be specified in a JVM neutral way using the following syntax:
%IF_EXISTS%("<setting name>", "@<setting name>@").The %IF_EXISTS% is a keyword that tells the launcher to perform conditional text replacement. The first argument to this function is the name of a JVM setting. If the specified setting exists for that JVM, the second argument is resolved and placed in the launch command as an argument to Java.
NOTE: | Both of the arguments passed to this function need to be enclosed in double quotes. If it does not exist, it will resolve to an empty string. You can include multiple %IF_EXISTS% function calls in this property - just make sure to place a space between them. |
%IF_EXISTS%("INIT_JAVA_HEAP", "@INIT_JAVA_HEAP@20m") %IF_EXISTS%("MAX_JAVA_HEAP", "@MAX_JAVA_HEAP@40m")Results:
-Xms20m -Xmx40m
.
-ms20m -mx40m
.
INIT_JAVA_HEAP
and MAX_JAVA_HEAP
properties have been changed to HPUX_118_INIT_JAVA_HEAP
and HPUX_118_MAX_JAVA_HEAP
, respectively. The original property names resulted in "out of memory" errors because the "garbage collector" was not running properly.