Adds path to the run-time CLASSPATH. This
specifies where java will search for
Java classes. See Description
for a discussion of the run-time evaluation of these
pathnames.
The -C option can be repeated, such as:
example% javald -C /usr/class -C /optjava...
-Hdir
Sets JAVA_HOME to dir.
-joption-list
Allows the set of options to be passed to the
invocation of java to be set. If there are
multiple options, they should be quoted to ensure
that they are passed into the resulting wrapper.
-ooutfile
Places the wrapper in outfile.
-Rpath
Adds path to the run-time LD_LIBRARY_PATH.
This specifies where java will
search for native methods. See Description
for a discussion of the run-time evaluation of these
pathnames.
The javald tool creates a convenient
wrapper that captures the necessary environment needed to run
a Java application specified by classname. If the -o
option is provided, the resulting executable wrapper
saved to file outfile. If the -o
option is not specified, then the default output file name
used is the name of the class.
This wrapper sets the necessary environment variables
needed by the java tool before it executes
the class specified by classname.
If the -H flag is specified, the wrapper
sets JAVA_HOME to the path specified by the
option. If -H option is not specified, the
wrapper attempts to use the user's environment JAVA_HOME
if set; otherwise it assumes a default JAVA_HOME
of /usr/java.
Paths specified as arguments to the -C
and -R flags of the javald
command are treated differently.
The path arguments, which may include shell variables, are
subject to deferred evaluation --that is, they are evaluated
when the wrapper is executed.
Relative pathnames are treated as pathnames relative to
the directory where the wrapper is installed, not the current
working directory.
This behavior is designed to support applications that
consist of several classes in a directory hierarchy rather
than a single executable. Using relative pathnames allows
this directory hierarchy (thus the application) to be more
easily moved to different filesystems.
The default CLASSPATH created by the
wrapper if no -C options are used is
equivalent to specifying -C.
The default interpreter executed by the wrapper is $JAVA_HOME/bin/java.
When appl is run, java will attempt to invoke
the main() method
of the AcmeApp class. The
java interpreter will search for AcmeApp in /opt/acme/classes, then in the
default system class directory, ${JAVA_HOME}/lib/classes.zip.
Example 2:
The following command creates a script called MyApp: