The Wrapper allows any configuration property to be set from
the command line. This can be useful in situations where
configuration values can only be set at runtime. An example
can be seen by looking at the sh
script shipped with the Wrapper.
Configuration properties can be set on the command line by
including them after the configuration file when launching
Wrapper. Each property consists of a property name, followed
by '=', followed by the
property's value. The syntax is exactly the same as in the
wrapper.conf file.
In this example, an application is being launched using a
specific java application and debug logging enabled.
Windows NT/2000: |
Wrapper.exe -c ..\conf\wrapper.conf wrapper.java.command=java wrapper.debug=true
|
Linux / Solaris: |
./wrapper ../conf/wrapper.conf wrapper.java.command=java wrapper.debug=true
|
Properties set on the command line will override any property
value set in the configuration file or any cascaded include files.
NOTE
|  |
Properties specified on the command line can not contain
unquoted spaces. If you need to include spaces in the value
of the property, simply include the entire name-value pair
in quotes:
Example: |
Wrapper.exe -c ..\conf\wrapper.conf "wrapper.java.command=C:\My App\jre\bin\java.exe"
|
|
Properties can be specified from the command line when using any of the
Wrapper commands, including the -i
command, used to install the application as a service on Windows systems.
When running the wrapper and its JVM as a console application using the
-c command, the specified properties will
override any values in the wrapper.conf file and be used when launching the
JVM.
Likewise, the -i command, which is used
to install the wrapper as a service, will remember the specified properties
and then use them later when the service is actually started. Likewise,
the specified properties will be used to override values in the wrapper.conf
file while installing the service.
All other commands will make use of command line properties to override values
in the configuration file. These will effect logging or the way the service is
referenced. They will have no effect on the running JVM. It is not possible
for example to pass a property value to a service while starting it with the
-t command for example.
|