'\" t .\" @(#)javald.1 1.4 99/02/01 SMI; .\" Copyright 1999 Sun Microsystems, Inc. All rights reserved. .\" Copyright 1999 Sun Microsystems, Inc. Tous droits réservés. .\" '\"macro stdmacro .TH javald 1 "12 June 1997" .SH NAME javald \- wrapper creator for java application .\" .\" This document was created by saving an HTML file as text .\" from the JavaSoft web site: .\" .\" http://www.javasoft.com:80/products/jdk/1.1/docs/tooldocs/solaris/index.html .\" .\" and adding appropriate troff macros. Because the JavaSoft web site .\" man pages can change without notice, it may be helpful to diff .\" files to identify changes other than new functionality. .\" .SH SYNOPSIS .B /usr/java/bin/javald [ .BI "\-C " path ] [ .BI "\-H " dir ] .if n .ti +5n [ .BI "\-j " option-list ] [ .BI "\-o " outfile ] [ .BI "\-R " path ] .if t .ti +5n .I classname .SH DESCRIPTION .IX "wrapper creator for java application" "" "wrapper creator for java application \(em \fLjavald\fP" .IX "javald" "" "\fLjavald\fP \(em wrapper creator for java application" .LP The .B javald command creates a convenient wrapper that captures the necessary environment needed to run a Java\(tm application specified by .I classname. If the .B \-o option is provided, the resulting executable wrapper is .IR outfile . If the .B \-o option is not specified, then the default used is the name of the class. .LP This wrapper sets the necessary environment variables needed by .BR java (1) before it executes the class specified by .I classname. .LP If the .B \-H flag is specified, the wrapper sets .SB JAVA_HOME to the .I path specified by the option. If .B \-H option is not specified, the wrapper attempts to use the user's environment .SB JAVA_HOME if set; otherwise it assumes a default .SB JAVA_HOME of .BR /usr/java . .LP Paths specified as arguments to the .B \-C and .B \-R flags of the .B javald command are treated differently. .LP The path arguments, which may include shell variables, are subject to deferred evaluation that is, they are evaluated when the wrapper is executed. .LP Relative pathnames are treated as pathnames relative to the directory where the wrapper is installed, not the current working directory. .LP 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. .LP The default .SB CLASSPATH created by the wrapper if no .B \-C options are used is equivalent to specifying .BR \-C . .\".LP .\"The resultant .\".SB CLASSPATH .\"set by the wrapper has the .\"following order: .\".TP 15 .\"1) .\"\-C option paths take the first order of precedence in .\".SB CLASSPATH, .\".TP 15 .\"2) .\"default classpath .\".I $JAVA_HOME/lib/classes.zip .\"is second. .LP The default interpreter executed by the wrapper is \f3$\s-1JAVA_HOME\s0/bin/java\fP. .SH OPTIONS The following options are supported: .TP 15 .BI \-C " path" Adds .I path, to the run-time .SB CLASSPATH. This specifies where .BR java (1) will search for Java classes. See .B DESCRIPTION for a discussion of the run-time evaluation of these pathnames. .\"If .\".I path .\"is an absolute pathname it is simply prepended .\"to the .\".SB CLASSPATH. .\"If .\".I path .\"is relative then .\".I path .\"is evaluated .\"relative to the location of the wrapper. Pathnames given .\"with \-C may contain shell metacharacters and variable .\"substitution to be evaluated at runtime. .sp 1n The .B \-C option can be repeated, such as .sp 1n .RS 20 .B example% javald \-C /usr/class \-C /optjava.\|.\|. .RE .sp 1n .TP 15 .BI \-H " dir" Sets .SB JAVA_HOME to .IR dir . .TP 15 .BI \-j " option-list" Allows the set of .I options to be passed to the invocation of .BR java (1) to be set. If there are multiple .IR options , they should be quoted to ensure that they are passed into the resulting wrapper. .TP 15 .BI \-o " outfile" Places the wrapper in .IR outfile . .br .ne 3 .TP 15 .BI \-R " path" Adds .I path to the run-time \s0\f3LD_LIBRARY_PATH\s0\fP. This specifies where .BR java (1) will search for native methods. See .B DESCRIPTION for a discussion of the run-time evaluation of these pathnames. .SH EXAMPLES .SS "Example 1:" A wrapper .B appl is created in .B /opt/acme/bin .RS .sp 1n .B example% javald \-o /opt/acme/bin/appl \-C "/opt/acme/classes acmeApp" .sp 1n .RE that contains the following environment variables: .RS .sp 1n .B JAVA_HOME=${JAVA_HOME:-/usr/java} .br .B CLASSPATH=/opt/acme/classes .sp 1n .RE When .B appl is run, .BR java (1) will attempt to invoke the .B main(\|) method of the .B acmeApp class. The .BR java (1) interpreter will search for .B acmeApp in .BR /opt/acme/classes , then in the default system class directory, \f3${\s-1JAVA_HOME\s0}/lib/classes.zip\fP. .\".SS "Example 2:" .\".nf .\".sp .\" javald -H /opt/ACME -C "$ACMEHOME/lib" \\ .\" -C /opt/ACME/classes fred .\".fi .\".LP .\"A wrapper 'fred' is created which will evaluate: .\".nf .\" JAVA_HOME=/opt/ACME .\" CLASSPATH=$ACMEHOME/lib:/opt/ACME/classes:\\ .\" /opt/ACME/lib/classes.zip .\".fi .\".LP .\".SB ACMEHOME .\"will be picked up from the user's environment .\"invoking the wrapper. .\".SS "Example 3: (cwd=/home/jsms)" .\".nf .\".sp .\" % cd src .\" % javac fred.java .\" % javac dave.java .\" % cp -p *.class ../lib/ .\" % cd ../bin .\" % javald -C ../lib -o fred fred .\".fi .\".LP .\"A wrapper .\".I /home/jsms/bin/fred .\"is created which when run .\"from any place will evaluate: .\".nf .\" JAVA_HOME=/usr/java .\" CLASSPATH=`dirname $0`/../lib:/usr/java/lib/classes.zip .\".fi .\".SS "Example 4:" .\".nf .\".sp .\" javald -o /usr/local/javaprogs/fred -C ../classes \\ .\" -C /opt/ACME/classes /opt/ACME/app/fred .\".fi .\".LP .\".ne 9 .\"A wrapper .\".I /usr/local/javaprogs/fred .\"is created which will evaluate: .\".nf .\" JAVA_HOME=/usr/java .\" CLASSPATH=/usr/local/classes:\\ .\" /opt/ACME/classes:/usr/java/lib/classes.zip .\" .\" .\" CLASSPATH=`dirname $0`/../classes:\\ .\" /opt/ACME/classes:/usr/java/lib/classes.zip .\".fi .SS "Example 2:" The following command creates a script called .BR myapp: .RS .sp 1n \f3example% javald -o myapp -j '-noverify -ms8m' myapp\fP .sp 1n .RE which contains an invocation of the .BR java (1) interpreter that looks like: .RS .sp 1n .B example% exec {JAVA_HOME}/bin/java -noverify -ms8m myapp $@ .sp 1n .RE .SH ENVIRONMENT VARIABLES .TP 15 .SB JAVA_HOME Use the .SB JAVA_HOME environment variable to specify the .B java (1) runtime. .SH FILES .TP 20 .B /usr/java/lib/classes.zip Archive of Java runtime classes. Please note that it does not need to be unzipped. .SH ATTRIBUTES See .BR attributes (5) for a description of the following attributes: .sp .TS box; cbp-1 | cbp-1 l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE = Availability SUNWjvrt .TE .SH SEE ALSO .BR java (1) .\" .\" I was unable to find the following document .\" at the JavaSoft web site or at docs.sun.com .\" .\" .LP .\" See the .\" "Creating Java Applications on Solaris" .\" section of the .\" .I "Solaris Supplement for the JavaStation Guide". .\" .TP 10 .IR "The Java Tutorial " @ http://java.sun.com:80/docs/books/tutorial/index.html .LP .TP 10 For information on related topics, use the search link @ http://java.sun.com/