Class JavaProgram

  • All Implemented Interfaces:

    public class JavaProgram
    extends Object
    implements Serializable
    Represents an IBM i Java program. This class is supported only when connecting to systems running IBM i V5R1 or higher, and is not supported beyond IBM i 7.1.

    In the context of this discussion, a "Java program" is the IBM i executable object that is created when the CRTJVAPGM (Create Java Program) CL command is run against a class, JAR, or ZIP file.
    Using the JavaProgram class, you can obtain the following information about an IBM i Java program:

    • Adopted authority profile
    • File change date
    • File owner
    • Java program creation date
    • Release program was created for
    • Licensed Internal Code options
    • Number of attached java programs
    • Number of classes
    • Number of classes with current java programs
    • Number of classes without current java programs
    • Number of classes with errors
    • Optimization level
    • Path used
    • Performance Collection Enabled flag
    • Performance Collection type
    • Profiling data status
    • Size of attached java programs
    • Use adopted authority

    An Example using the JavaProgram class:
    // Create a JavaProgram object to refer to a specific Java program.
    AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD");
    JavaProgram javaProgram = new JavaProgram(system, "/home/mydir/HelloWorld.class");
    // Get the optimization. int optimization = javaProgram.getOptimizationLevel();
    // Get the file owner. String owner = javaProgram.getFileOwner();
    See Also:
    Serialized Form