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

The wrapper.java.classpath.use_environment property is used to configure whether the Wrapper passes the generated classpath to the JVM on the Java command line or by setting the CLASSPATH environment variable. The default value is FALSE.


In most cases, the default behavior is perfectly fine. The full classpath can cause the Java command line to be quite large however. Some users have requested the ability to avoid including the classpath in the command line so the Java command line is easier to work with with 3rd party tools.


If this property is TRUE, it will replace the CLASSPATH environment variable in the Wrapper's environment. This means that if the Wrapper configuration file makes reference to a system CLASSPATH, it will fail when the JVM is restarted if configuration file reloading is being used.


On Windows, the maximum possible environment variable size is 32767 characters, including the name of the property and an equal character. In the case of the CLASSPATH, this means that the maximum possible classpath can be 32757 characters in length. The Java command line also has such a restriction but with other parameters, the maximum classpath there will be even shorter. This is an OS level limit which can not be worked around.

If you really need to make use of a longer classpath then it is possible to do so from within the JVM by creating a bootstrap class and a custom classloader. Usually the easiest way to do this is to create a new instance of the URLClassLoader class.

Referencia: Classpath y Module Path