World Map
Java Service Wrapper is the easiest way to make your product more reliable.
  • Free Trial
  • Buy Now
wrapper.java.additional.<n> Property

Index

wrapper.java.additional.<n>

Compatibility : 1.0.0
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

Additional Java parameters to pass to Java when it is launched. These are not parameters for your application, but rather parameters for the JVM.

<n> component:

Each element has a property name which starts with wrapper.java.additional. and the "<n>" component of the property name is an integer number counting up from "1". By default, there can be no missing numbers. The wrapper.ignore_sequence_gaps property can optionally be set to allow gaps in the sequence.

Example:
wrapper.java.additional.1=-server
wrapper.java.additional.2=-Dprop=TRUE

It is important that each property only define a single argument to the JVM. If the value needs to include a space, then it is necessary to add quotes following the rules described below.

Example (Incorrect):
wrapper.java.additional.1=-server -Dprop=TRUE

NOTE

While the wrapper.java.detect_debug_jvm property is set to TRUE, if one of wrapper.java.additional.<n> properties is set to "-Xdebug", then the Wrapper will decide the JVM is using a debugger and ignore certain timeouts.

If you wish to dynamically change the list of additional Java parameters there are a few ways to do so. The first is to make use of cascading include files to include a dynamically generated configuration file which contains the dynamic property definitions. The second option is to make use of the wrapper.java.additional_file property to make use of a parameter list stored directly in a file.

wrapper.java.additional.<n>.stripquotes

Compatibility : 1.0.0
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :Windows (Not Supported)Mac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

If a wrapper.java.additional.<n> value contains quotes, then the contents of the quotes will be passed to the JVM as a single argument on Windows. However on UNIX, the quotes will also be included as part of the argument value. In most cases, this is not correct behavior on UNIX, but it is this way to maintain backwards compatibility.

The wrapper.java.additional.<n>.stripquotes property makes it possible to tell the Wrapper to automatically strip those extra quotes on UNIX. The property is ignored on Windows.

Defaults to the value of the wrapper.java.additional.default.stripquotes property, which itself defaults to "FALSE".

<n> component:

Each element has a property name which starts with wrapper.java.additional. and the "<n>" component of the property name is an integer number counting up from "1". By default, there can be no missing numbers. The wrapper.ignore_sequence_gaps property can optionally be set to allow gaps in the sequence.

Example:
wrapper.java.additional.1.stripquotes=FALSE

The following replacements will be made when stripping quotes. All other characters will remain unchanged.

  • '\\' will become '\',
  • '\"' will become '"'
  • '"' will become ''
Example:
wrapper.java.additional.1=-server
wrapper.java.additional.2=-Dprop=TRUE
wrapper.java.additional.3=-Dmyapp.data="../MyApp Home"
wrapper.java.additional.3.stripquotes=TRUE

wrapper.java.additional.default.stripquotes

Compatibility :3.5.17
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :Windows (Not Supported)Mac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

Makes it possible to change the default strip quotes behavior on UNIX when you wish to have the same behavior for all wrapper.java.additional.<n> property values. The default value is "FALSE". The property is ignored on Windows.

Example:
wrapper.java.additional.default.stripquotes=FALSE

wrapper.java.additional_file

Compatibility :3.5.16
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

In certain cases, it can be inconvenient to list up your java parameters in the Wrapper configuration file. This property provides a way to specify a file which can contain one or more parameters that will be passed as is to the JVM when it is launched. This can be very useful when the parameter list needs to be generated dynamically or via an installer.

Any parameters defined in this file will appear after those defined using the standard wrapper.java.additional.<n> properties.

Starting with Wrapper version 3.5.23, any environment variable references in the file will be expanded.

Parameter File Format:

The file format is simple.

  • It must start with an encoding directive line just like the Wrapper configuration file. This is needed to tell the Wrapper what encoding to use when reading the file. If this line is missing then the Wrapper will attempt to proceed after logging a warning. The encoding used in the file may be different from the encoding used in other configuration files.
  • Multiple parameters can be written in one line by separating each parameter with one or more spaces.
  • It is also possible to break the parameters into multiple lines.
  • The '#' character is interpreted as a comment character. To include a '#' character in a property value, the value must either be quoted ("#") or escaped by a second '#' character.
  • If any of the values need to include a space, then it is necessary to add quotes following the rules described below to make sure the file works consistently across all platforms.
Example of Parameter File UTF-8:
#encoding=UTF-8
# Example parameters: Multiple parameters in one line
-DTEST1=Value1 -DTEST2=Value2

# More parameters
-DTEST3=Value3

wrapper.java.additional_file.stripquotes

Compatibility :3.5.16
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

Different platforms handle parameters with spaces differently. To make a given configuration work consistently, you should always quote those values. They will be used as is on Windows. However, on UNIX platforms, the quotes will be stripped as the command line is broken into a parameter list.

In almost all cases you will want to strip these quotes. To be consistent with the way the wrapper.java.additional.<n>.stripquotes property works, this property defaults to the value of the wrapper.java.additional.default.stripquotes property, which itself defaults to "FALSE".

Example:
wrapper.java.additional_file.stripquotes=FALSE
Example of Parameter File UTF-8:
#encoding=UTF-8
-DTEST1=Value1 -DTEST2="Test Value with spaces."

Reference: How to use Parameters