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

wrapper.java.version.* Properties Overview

The Java Service Wrapper has the ability to print the Java version specified with the wrapper.java.command, and to prevent the application from starting if the version of Java is not within a configured range.

wrapper.java.version.output

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

It can sometimes lead to unexpected or surprising behaviours when running a Java application with a different Java version than intended for the program.

Therefore it might be helpful to see the exact version of the JVM, which is being used before the application is being started.

The Wrapper will print out the exact version of the JVM if the wrapper.java.version.output property is set to TRUE. The default value is "FALSE", however.

The Wrapper will also automatically output the JVM version, if it runs in debug mode.

Log Example:
wrapper  | Launching a JVM...
jvm 1    | java version "1.6.0_24"
jvm 1    | OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~10.04.2)
jvm 1    | OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
jvm 1    | WrapperManager: Initializing...

NOTE

From version 3.5.35, the log output uses a different source 'JVM ver.' (instead of 'JVM 1', 'JVM 2', etc.) when showing the version of Java. This is done to avoid confusion with the output of the Java application.

wrapper.java.version.timeout

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

This specifies the number of seconds for the child process to print the JVM version before it is terminated.

For most users, this timeout will never be reached because printing the JVM version is fast. However, it may happen on slow machines that the JVM is taking a lot of time to start. If the delay reaches the timeout, then the child process is killed and the JVM version will not be printed.

The default value is 10 seconds. If you set the value to 0, then the Wrapper will wait indefinitely for the child process to terminate.

Taking too long to print JVM version:
wrapper  | Launching a JVM...
wrapper  | Child process: Java version: timed out
jvm 1    | WrapperManager: Initializing...

wrapper.java.version.min

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

Specifies the minimum version of Java for which the Wrapper is allowed to launch the Java Application.

The default value is '1.4' which is the oldest JVM version supported by the Wrapper. Any lower value is invalid and will cause the Wrapper to stop.

The value can be in the format '1.major[.minor[_revision]]' or 'major[.minor[.revision]]', regardless the version of Java. This is done to support both numbering schemes returned by 'java -version': prior to Java 9 the first format was used, while Java 9 and above use the second format.

The brackets indicate that the minor and revision components are optional:

If the minor components is not specified, the Wrapper will allow any minor versions and revisions of Java as long as the major version is greater than or equal to the configured value.

If the revision component is not specified, the Wrapper will allow any revisions of Java as long as the major and minor components are greater than or equal to those of the configured value.

Java 1.7 or higher are allowed:
wrapper.java.version.min=1.7

Java 8.0.40 or higher are allowed:
wrapper.java.version.min=8.0.40

WARNING

wrapper.java.version.max

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

Specifies the maximum version of Java for which the Wrapper is allowed to launch the Java Application.

The default value is 'UNLIMITED' which allows the Wrapper to start the Java application with the latest versions of Java. Usually this is expected to work thanks to backward compatibility ensured through the versions of Java. However, the practice is sometimes different, and it is advised to use a version of the Wrapper released after (or close to) the release date of Java, as the compatibility can be tested and confirmed.

The value can be in the format '1.major[.minor[_revision]]' or 'major[.minor[.revision]]', regardless the version of Java. This is done to support both numbering schemes returned by 'java -version': prior to Java 9 the first format was used, while Java 9 and above use the second format.

The brackets indicate that the minor and revision components are optional:

If the minor component is not specified, the Wrapper will allow any minor versions and revisions of Java as long as the major version doesn't exceed the configured value.

If the revision component is not specified, the Wrapper will allow any revisions of Java as long as the major and minor components don't exceed those of the configured value.

Java 9.0.1 and lower are allowed:
wrapper.java.version.max=9.0.1

All revisions and minor releases of Java 9, and lower are allowed:
wrapper.java.version.max=9

WARNING

Reference: Java Command