The class path configuration file contains a list of file
paths for the dependent JAR files for each user class of the Java
Integration stage. The Java Integration stage adds the class path
definitions when the user class is loaded.
You create the class path configuration file to specify
class path for the classes that your user class depends. The class
path property of the Java Integration stage can then specify only
the class path for your user class. The class path configuration file
encoding is UTF-8 and you can specify the class path definition in
any language.
- Comment line
- The class path configuration file can contain comment lines that
contain a number sign (#) or exclamation point (!) as its first character
that is not a white space character.
- Classpath definition
- A key-value pair in key = value format.
The syntax is classpath:user_class_name = classpath_definition.
- classpath
- A mandatory prefix for the key. It is case-sensitive. If a class
path definition is specified without a user class name, the class
path definition is used for user classes that are not defined in the
class path configuration file.
- :user_class_name
- An optional key to specify the class name of the user class for
the Java™ Integration stage.
You can specify :user_class_name with or without
the package name. A class name entry with the package name is searched
first, if no entry is found, then a class name entry without the package
name is used. If two or more :user_class_name entries
are defined with the same key, then the entry that is defined last
is used.
- =
- It is a separator of key and value. If there are leading and trailing
white spaces before and after the specified key and value, then the
white-space characters are trimmed when the entries are searched.
- classpath_definition
- A list of file paths for the dependent JAR files of the user class,
each separated by semicolons. If there are white spaces before and
after the semicolon, they are trimmed when the file paths are set
to the class path.
- Environment variable
- You can reference an environment variable in classpath_definition in
the following format: ${env_name}. The Java Integration stage replaces the environment
variable with a resolved value to make the class path definition.
If the value that is specified for the environment variable contains
semicolons, the Java Integration
stage treats the resolved value as a list of file paths.
- For example, if the value for env1 environment variable is defined
with /test/abc.jar;/test/xyz.jar and ${env1}
is specified in the class path definition, the file path of /test/abc.jar and /test/xyz.jar are
added to the class path.
Note: If a value is not defined for the environment
variable that is specified, the environment variable is replaced with
an empty string. The Java Integration
stage does not try to resolve an environment variable reference in
the resolved value and treat that as a string. A string prefixed with
a dollar sign ($) is considered to be a part of a file path if a
complete form of environment variable reference is not specified.
- Wildcard
- An asterisk character (*) is the wildcard character. The Java Integration stage treats wildcard
as an equivalent of specifying a list of all JAR files with .jar extension
in a directory. When a wildcard character is used, the subdirectories
are not searched recursively. The order in which the JAR files in
a directory are enumerated is not specified and might vary. Do not
use the wildcard character if you want the JAR files in a directory
to be enumerated in a specific order.
- Escape character
- To specify a file path separator (;) or environment variable reference
(${env_name}) as part of the file path, enclose them in double quotation
marks. For example, “${ABC_HOME};${XYZ_HOME}” is treated
as a file path and not as references to two environment variables.
Note: The Java Integration
stage does not handle double quotation mark in environment variable
references or resolved values. If a class path definition misses the
closing quotation mark, the Java Integration
stage treats it as specified.
- Backslash
- A backslash (\) is a file name separator that is used by Microsoft Windows computers and can be specified the
as a valid class path definition. For example, classpath =
${XYZ_HOME}\lib\xyz.jar