com.ibm.as400.access

Class JavaProgram

  • java.lang.Object
    • com.ibm.as400.access.JavaProgram
  • All Implemented Interfaces:
    java.io.Serializable


    public class JavaProgram
    extends java.lang.Object
    implements java.io.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
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String ADOPTED_AUTHORITY_PROFILE_OWNER
      Constant indicating that the profile to use when the use adopted authority field is set is *OWNER.
      static java.lang.String ADOPTED_AUTHORITY_PROFILE_USER
      Constant indicating that the profile to use when the use adopted authority field is set is *USER.
      static java.lang.String PERFORMANCE_COLLECTION_TYPE_ENTRYEXIT
      Constant indicating the type of performance collection is *ENTRYEXIT.
      static java.lang.String PERFORMANCE_COLLECTION_TYPE_FULL
      Constant indicating the type of performance collection is *FULL.
      static java.lang.String PROFILING_DATA_STATUS_APY
      Constant indicating that profile data has been applied to the attached Java program(s).
      static java.lang.String PROFILING_DATA_STATUS_COL
      Constant indicating that profile data collection is enabled for the attached Java program(s).
      static java.lang.String PROFILING_DATA_STATUS_NOCOL
      Constant indicating that profile data collection is not enabled for the the Java program(s).
    • Constructor Summary

      Constructors 
      Constructor and Description
      JavaProgram()
      Creates a JavaProgram
      JavaProgram(AS400 system, java.lang.String path)
      Creates a JavaProgram