wrapper.java.classpath.<n>

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

Java Classpath to use. This series of properties allows you to list up the various class path elements to use when launching the application. It can contain jar files as well as directories containing class files.

NOTE

For versions of the Wrapper before 3.5.55, this list must contain the wrapper.jar file.

Since version 3.5.55, it is recommended to use the wrapper.jarfile property to indicate the path to the wrapper.jar file.

<n> component:

Each element has a property name which starts with wrapper.java.classpath. 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.classpath.1=../lib/myapp.jar
wrapper.java.classpath.2=../lib/mysql.jar
wrapper.java.classpath.3=../classes

If a wildcard character is used within a classpath entry, all matching files will added to the classpath used when launching a JVM instance.

Valid wildcard characters are

  • A '*' character will match "0" (zero) or more characters.
  • A '?' character will match exactly one character.

Sort:

Starting with the Wrapper version 3.3.8, the Wrapper now sorts lists of jar files matched by an individual classpath property containing wildcards. This is done to make sure that the exact same classpath is used on all installations of an application. Normally this would not be an issue, however sometimes a resource file or class is duplicated in more than one jars. By controlling the order of the jars, it is guaranteed that the same version will always be used.

Example:
wrapper.java.classpath.1=../lib/*.jar
wrapper.java.classpath.2=../classes

Environment variable:

If you wish to include a system defined classpath as part of the Wrapper's classpath, you can do so by referencing the appropriate environment variable. The resulting wrapper.conf file will still be cross platform compatible because the path separator in the included classpath will always be correct for the current platform.

Example (referencing environment variable):
wrapper.java.classpath.1=%CLASSPATH%

Problems?:

If you encounter any problems related to classpath, the first thing that should be done is to verify the full classpath being generated by the Wrapper. To do this, either enable debug log output with the wrapper.debug property, or enable the display of the Java command using the wrapper.java.command.loglevel property.

NOTE

Classpath containing spaces:

The Wrapper will correctly handle class path elements which contain spaces. This is done later by the Wrapper by enclosing the final generated class path in quotes. Individual class path element property values should never be defined containing quotes even if they contain spaces.

NOTE

On Windows, the maximum possible command line length is 32767 characters. This is an OS level limit which can not be worked around. If you are very close to this limit then you can try the wrapper.java.classpath.use_environment variable. But it unfortunately also has its own limits on Windows.

Reference: Class Path and Module Path