Analyze Java Program (ANZJVAPGM)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Analyze Java Program (ANZJVAPGM) command analyzes a Java program, lists its classes and shows the current status of each class.

Restrictions: The file must be in one of the following file systems: QOpenSys,"root", or a user-defined file system.

Top

Parameters

Keyword Description Choices Notes
CLSF Class file or JAR file Path name Required, Positional 1
CLASSPATH Classpath Path name, *PGM, *ENVVAR Optional
JDKVER Java developer kit version Character value, *PGM, *CURRENT Optional
DETAIL Detail *NONCURRENT, *FULL Optional
OUTPUT Output *, *PRINT Optional
Top

Class file or JAR file (CLSF)

Specifies the class file , JAR file, or ZIP file name which has a Java program to analyze. The file name may be qualified by one or more directory names.

class-file-name
Specify the name of the class file. If the name is qualified it must be enclosed in apostrophes. An example of a qualified class file name is '/directory1/directory2/myclassname.class'.
JAR-file-name
Specify the name of the Java archive (JAR) file. A file is assumed to be a JAR file if the file name ends with '.jar' or '.zip'. If the name is qualified it must be enclosed in apostrophes. An example of a qualified JAR file name is '/directory1/directory2/myappname.jar'.
Top

Classpath (CLASSPATH)

Specifies the path used to locate classes referenced by the Java program being analyzed. Directories are separated by colons.

*PGM
The class path to use is the same one used to create the Java program being analyzed.
*ENVVAR
The class path is determined by the environment variable CLASSPATH.
class-path
Path used to locate classes. An example class path is '/directory1/directory2:/QIBM/ProdData/Java400'.
Top

Java developer kit version (JDKVER)

Specifies the Java Development Kit (JDK) version to use when analyzing the Java program.

*PGM
The JDK version path to use is the same one used to create the Java program being analyzed.
*CURRENT
The JDK version currently installed as the system default is to be used.
Java-Development-Kit-version
The JDK version to be used. An example JDK version is '1.2.2'.
Top

Detail (DETAIL)

Specifies the amount of detail to show.

*NONCURRENT
Show only those classes which are not current with respect to the given classpath.
*FULL
Show all classes included in the Java stand-alone program. A status of current or not current will be shown for each class.
Top

Output (OUTPUT)

Specifies whether the output from the command is shown at the requesting work station or printed with the job's spooled output.

*
Output requested by an interactive job is shown on the display. Output requested by a batch job is printed with the job's spooled output.
*PRINT
The output is printed with the job's spooled output.
Top

Examples

ANZJVAPGM   CLSF('/projectA/myJavaclassname.class')
            DETAIL(*FULL)  OUTPUT(*)

This command will analyze the Java program associated with the class file myJavaclassname. The status for all classes included in the Java program will be listed. The Java program information will be output to the display.

Top

Error messages

*ESCAPE Messages

JVAB278
No Java program associated with the file.
JVAB544
Unmonitored exception received.
Top