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.

NOTA

When jdb or javaw are used as the Java command, their output can't be used to parse information such as the Java version or vendor. Since version 3.5.45, the Wrapper tries to find the 'java' command in the same directory (or simply 'java' if the command has to be resolved using the system PATH), and uses it to query information. Failing that, you can still use the wrapper.java.version.fallback property to specify the version manually.

wrapper.java.version.output

Compatibilidad :3.5.17
Ediciones :Edición ProfesionaEdición EstándarEdición de la Comunidad
Plataformas :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

It can sometimes lead to unexpected or surprising behaviors 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.

As of version 3.5.55, the default value is based on the value of wrapper.java.query.loglevel:
 - If wrapper.java.query.loglevel is set to DEBUG, wrapper.java.version.output defaults to FALSE.
 - If wrapper.java.query.loglevel is set to INFO or any higher level, wrapper.java.version.output defaults to TRUE.

Prior to version 3.5.55, the default value was "FALSE".

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...

NOTA

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

Compatibilidad :3.5.27
Ediciones :Edición ProfesionaEdición EstándarEdición de la Comunidad
Plataformas :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

Number of seconds that the Wrapper will wait for the Java version to be printed. If this timeout exceeds, the Wrapper will kill the child process and resolve the Java version to the minimum supported value.

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 30 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.fallback

Compatibilidad :3.5.38
Ediciones :Edición ProfesionaEdición EstándarEdición de la Comunidad
Plataformas :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

This property is used in case the Wrapper fails to parse the output of 'java -version'.

If it is not set, the Java version will be resolved to the lowest supported version, but the Wrapper will stop when the following properties are used:

When wrapper.java.version.fallback is used however, all the above properties can be used even if the 'java -version' output would fail to be parsed.

Default to Java 1.8 in case the Java version could not be parsed:
wrapper.java.version.fallback=1.8

wrapper.java.version.min

Compatibilidad :3.5.35
Ediciones :Edición ProfesionaEdición EstándarEdición de la Comunidad
Plataformas :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. Leaving one or both unspecified means that these placeholders will accept any number.

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

ADVERTENCIA

wrapper.java.version.max

Compatibilidad :3.5.35
Ediciones :Edición ProfesionaEdición EstándarEdición de la Comunidad
Plataformas :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. Leaving one or both unspecified means that these placeholders will accept any number.

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

ADVERTENCIA

Referencia: Comandos de Java