ANZJVAPGM (Analyze Java Program)

ANZJVAPGM Command syntax diagram

 

Purpose

The Analyze Java Program (ANZJVAPGM) analyzes an iSeries 400 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.

 

Required Parameters

CLSF
Specifies the Java class or Java Archive (JAR) file name that identifies the Java program to analyze. The file name may be qualified by one or more directory names.

 

Optional Parameters

CLASSPATH
Specifies a list of directories or JAR files to be searched for classes referenced by the Java program being analyzed.

*PGM: The class path to use is the same one used to create the Java program being analyzed.

*ENVVAR: The class path is to be taken from the environment variable CLASSPATH.

class-path: Path used to locate classes. An example class path is '/directory1/directory2:/QIBM/ProdData/Java400'.

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

*PGM: The JDK version used to create the Java program being analyzed is to be used.

*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'.

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.

OUTPUT
Specifies whether the output from the command is shown at the requesting workstation or printed with the job's spooled output. More information on this parameter is in Commonly used parameters.

*: 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.

Examples for ANZJVAPGM

Example 1: Analyze Java Program Using Command Defaults

ANZJVAPGM FILE('/projectA/team2/myJavaclassfilename.jar')

This command will analyze the Java program associated with file /projectA/team2/myJavaclassfilename.jar. The classpath used will be taken from the Java program being analyzed. The Java Development Kit version used will be the version used to create the Java program being analyzed. Only those classes which are not current with respect to the classpath will be shown. If the command is being run interactively, the results will be shown on the display. If the command is run in a batch job, the results are written to a spooled file.

Example 2: Analyze Java Program

ANZJVAPGM FILE('/projectB/myJavaclassfile.jar')
          CLASSPATH(*ENVVAR) JDKVER('1.1.8') OUTPUT(*PRINT)

This command will analyze the Java program associated with file /projectB/myJavaclassfile.jar. The classpath used will be taken from environment variable CLASSPATH. The Java Development Kit version used will be version 1.1.8. Only those classes which are not current with respect to the classpath will be shown. The results are written to a spooled file.

Error messages for ANZJVAPGM

None