World Map
Java Service Wrapper is the easiest way to make your product more reliable.
  • Free Trial
  • Buy Now
wrapper.registry.* Properties

wrapper.registry.* Properties

WARNING

DO NOT modify the value of these properties while an application using the configuration file has been installed as a Windows Service. Please uninstall the existing service BEFORE modifying this property. The service with the new value can then be safely reinstalled later.

The Wrapper can be configured to launch a JVM that has been configured in the Windows registry. The wrapper.java.command property is required to be set to an empty value.

If the Java command is located using the Windows registry, the path to the command will be stored into a WRAPPER_JAVA_HOME environment variable. This value can then be referenced in the values of other properties.

The following properties can be used to configure how to search in the Windows Registry. If none of them are set, the Wrapper will use the 'CurrentVersion' string of the Registry.

NOTE

Oracle changed the location of the registry keys for JRE versions 9 and above, so there can be two 'CurrentVersion' strings if old and recent versions coexist on the machine. By default the Wrapper will try using the current version of recent JRE installations (9 and above). Failing that, it will search for the current version of older JRE installations.

wrapper.registry.java_home

Compatibility :3.2.4
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :WindowsMac OSX (Not Supported)Linux (Not Supported)IBM AIX (Not Supported)FreeBSD (Not Supported)HP-UX (Not Supported)Solaris (Not Supported)IBM z/OS (Not Supported)IBM z/Linux (Not Supported)

By default, the Wrapper will look for a registry entry set by the Sun JRE installer. This property makes it possible to tell the Wrapper to look in a specific location for a registry key containing a JAVA_HOME value.

Default Registry Key:
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\{CurrentVersion}\JAVA_HOME

The specified registry key is the full path to a key of type "REG_SZ".

Example - Default Registry Location:
wrapper.java.command=
Example - Custom Registry Location:
wrapper.java.command=
wrapper.registry.java_home=HKEY_LOCAL_MACHINE\SOFTWARE\MyCompany\MyApplication\JavaHome

The registry entry should contain a fully qualified, absolute path to a Java installation. It should be the home directory of the installation. The Wrapper will append \bin\java to the specified directory.

Example - REG_SZ Value:
C:\Program Files\MyApp\jre

wrapper.registry.java_version

Compatibility :3.5.36
Editions :Professional EditionStandard EditionCommunity Edition (Not Supported)
Platforms :WindowsMac OSX (Not Supported)Linux (Not Supported)IBM AIX (Not Supported)FreeBSD (Not Supported)HP-UX (Not Supported)Solaris (Not Supported)IBM z/OS (Not Supported)IBM z/Linux (Not Supported)

This property can be used as an alternative to wrapper.registry.java_home to specify a version of the JRE to use when the Java command is located using the Windows registry. The Wrapper will look for the specified version contained in the registry key set by the JRE installer. If no match could be found, the Wrapper will stop with an error.

Example:
wrapper.java.command=
wrapper.registry.java_version=9

Reference: Java Command