JavaProgram instead, as this package may be removed in the future.public class RJavaProgram extends ChangeableResource
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. The following attribute IDs are supported:
CLASSES_WITHOUT_CURRENT_JAVA_PROGRAMS
CLASSES_WITH_CURRENT_JAVA_PROGRAMS
CLASSES_WITH_ERRORS
ENABLE_PERFORMANCE_COLLECTION
FILE_CHANGE
JAVA_PROGRAMS
JAVA_PROGRAM_CREATION
JAVA_PROGRAM_SIZE
LICENSED_INTERNAL_CODE_OPTIONS
OPTIMIZATION
OWNER
PROFILING_DATA
RELEASE_PROGRAM_CREATED_FOR
TOTAL_CLASSES_IN_SOURCE
USE_ADOPTED_AUTHORITY
USER_PROFILE
Use any of these attribute IDs with
getAttributeValue()
and setAttributeValue()
to access the attribute values for an RJavaProgram.
// Create an RJavaProgram object to refer to a specific Java program.
AS400 system = new AS400("MYSYSTEM", "MYUSERID", "MYPASSWORD");
RJavaProgram javaProgram = new RJavaProgram(system, "/home/mydir/HelloWorld.class");
// Get the optimization.
Integer optimization = (Integer)javaProgram.getAttributeValue(RJavaProgram.OPTIMIZATION);
// Set the enable peformance collection attribute value to full.
javaProgram.setAttributeValue(RJavaProgram.ENABLE_PERFORMANCE_COLLECTION, RJavaProgram.ENABLE_PERFORMANCE_COLLECTION_FULL);
// Commit the attribute change.
javaProgram.commitAttributeChanges();
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | CLASSES_WITH_CURRENT_JAVA_PROGRAMSDeprecated.  Attribute ID for classes with current Java programs. | 
| static java.lang.String | CLASSES_WITH_ERRORSDeprecated.  Attribute ID for classes with errors. | 
| static java.lang.String | CLASSES_WITHOUT_CURRENT_JAVA_PROGRAMSDeprecated.  Attribute ID for classes without current Java programs. | 
| static java.lang.String | ENABLE_PERFORMANCE_COLLECTIONDeprecated.  Attribute ID for enable performance collection. | 
| static java.lang.String | ENABLE_PERFORMANCE_COLLECTION_ENTRY_EXITDeprecated.  Attribute value indicating that the entry/exit information on all the procedures of the Java
    program (including those that are leaf procedures) is given. | 
| static java.lang.String | ENABLE_PERFORMANCE_COLLECTION_FULLDeprecated.  Attribute value indicating that the entry/exit information on all procedures of the Java
    program (including those that are leaf procedures) and precall and postcall
    hooks around calls to other procedures is given. | 
| static java.lang.String | ENABLE_PERFORMANCE_COLLECTION_NONEDeprecated.  Attribute value indicating that no performance collection is enabled for this Java program. | 
| static java.lang.String | FILE_CHANGEDeprecated.  Attribute ID for file change. | 
| static java.lang.String | JAVA_PROGRAM_CREATIONDeprecated.  Attribute ID for Java program creation. | 
| static java.lang.String | JAVA_PROGRAM_SIZEDeprecated.  Attribute ID for Java program size. | 
| static java.lang.String | JAVA_PROGRAMSDeprecated.  Attribute ID for Java programs. | 
| static java.lang.String | LICENSED_INTERNAL_CODE_OPTIONSDeprecated.  Attribute ID for licensed internal code options. | 
| static java.lang.String | NODeprecated.  Attribute value for no. | 
| static java.lang.String | OPTIMIZATIONDeprecated.  Attribute ID for optimization. | 
| static java.lang.Integer | OPTIMIZATION_10Deprecated.  Attribute value indicating that the Java program contains a compiled version
    of the class file byte codes but has only minimal additional compiler optimization. | 
| static java.lang.Integer | OPTIMIZATION_20Deprecated.  Attribute value indicating that the Java program contains a compiled version
    of the class file byte codes and has some additional compiler optimization. | 
| static java.lang.Integer | OPTIMIZATION_30Deprecated.  Attribute value indicating that the Java program contains a compiled version
    of the class file byte codes and has more compiler optimization than optimization
    level 20. | 
| static java.lang.Integer | OPTIMIZATION_40Deprecated.  Attribute value indicating that the Java program contains a compiled version
    of the class file byte codes and has more compiler optimization than optimization
    level 30. | 
| static java.lang.Integer | OPTIMIZATION_INTERPRETDeprecated.  Attribute value indicating that the Java program is not optimized. | 
| static java.lang.String | OWNERDeprecated.  Attribute ID for owner. | 
| static java.lang.String | PROFILING_DATADeprecated.  Attribute ID for profiling data. | 
| static java.lang.String | PROFILING_DATA_APPLYDeprecated.  Attribute value indicating that profiling data collection is applied for this Java program. | 
| static java.lang.String | PROFILING_DATA_CLEARDeprecated.  Attribute value indicating that all profiling data that has been collected 
    for this Java program is to be cleared. | 
| static java.lang.String | PROFILING_DATA_COLLECTIONDeprecated.  Attribute value indicating that profiling data collection is enabled for this Java program. | 
| static java.lang.String | PROFILING_DATA_NOCOLLECTIONDeprecated.  Attribute value indicating that no profiling data collection is enabled for this Java program. | 
| static java.lang.String | RELEASE_PROGRAM_CREATED_FORDeprecated.  Attribute ID for release program created for. | 
| static java.lang.String | TOTAL_CLASSES_IN_SOURCEDeprecated.  Attribute ID for total classes in source. | 
| static java.lang.String | USE_ADOPTED_AUTHORITYDeprecated.  Attribute ID for use adopted authority. | 
| static java.lang.String | USER_PROFILEDeprecated.  Attribute ID for user profile. | 
| static java.lang.String | USER_PROFILE_OWNERDeprecated.  Attribute value indicating that the authority checking that was done while
    this program is running should include both the use who is running the program
    and the program owner. | 
| static java.lang.String | USER_PROFILE_USERDeprecated.  Attribute value indicating that the authority checking that was done while
    this program is running should include only the user who is running the program. | 
| static java.lang.String | YESDeprecated.  Attribute value for yes. | 
| Constructor and Description | 
|---|
| RJavaProgram()Deprecated.  Constructs an RJavaProgram object. | 
| RJavaProgram(AS400 system,
            java.lang.String path)Deprecated.  Constructs an RJavaProgram object. | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | commitAttributeChanges(java.lang.Object[] attributeIDs,
                      java.lang.Object[] values)Deprecated.  Commits the specified attribute changes. | 
| void | delete()Deprecated.  Deletes the Java program. | 
| protected void | establishConnection()Deprecated.  Establishes the connection to the system. | 
| protected void | freezeProperties()Deprecated.  Freezes any property changes. | 
| java.lang.Object | getAttributeUnchangedValue(java.lang.Object attributeID)Deprecated.  Returns the unchanged value of an attribute. | 
| java.lang.String | getPath()Deprecated.  Returns the path. | 
| void | refreshAttributeValues()Deprecated.  Refreshes the values for all attributes. | 
| void | setPath(java.lang.String path)Deprecated.  Sets the path. | 
| java.lang.String | toString()Deprecated.  Returns the path. | 
cancelAttributeChanges, commitAttributeChanges, commitAttributeChanges, fireAttributeChangesCanceled, fireAttributeChangesCommitted, fireAttributeValueChanged, fireResourceCreated, fireResourceDeleted, getAttributeUnchangedValue, getAttributeValue, getAttributeValue, hasUncommittedAttributeChanges, initializeAttributeValue, setAttributeValue, setAttributeValueaddActiveStatusListener, addPropertyChangeListener, addResourceListener, addVetoableChangeListener, arePropertiesFrozen, equals, fireAttributeValuesRefreshed, fireBusy, fireIdle, firePropertyChange, fireVetoableChange, getAttributeMetaData, getAttributeMetaData, getPresentation, getResourceKey, getSystem, isBidiEnabled, isConnectionEstablished, removeActiveStatusListener, removePropertyChangeListener, removeResourceListener, removeVetoableChangeListener, setPresentation, setResourceKey, setSystempublic static final java.lang.String YES
public static final java.lang.String NO
public static final java.lang.String TOTAL_CLASSES_IN_SOURCE
public static final java.lang.String CLASSES_WITH_ERRORS
public static final java.lang.String CLASSES_WITH_CURRENT_JAVA_PROGRAMS
public static final java.lang.String CLASSES_WITHOUT_CURRENT_JAVA_PROGRAMS
public static final java.lang.String ENABLE_PERFORMANCE_COLLECTION
ENABLE_PERFORMANCE_COLLECTION_NONE
    - No performance collection is enabled for this Java program.
ENABLE_PERFORMANCE_COLLECTION_ENTRY_EXIT
    - This gives the entry/exit information on all the procedures of the Java
      program (including those that are leaf procedures).  This includes the
      PEP routine. This is useful in capturing information on all procedures.
ENABLE_PERFORMANCE_COLLECTION_FULL
    -  This gives the entry/exit information on all procedures of the Java
       program (including those that are leaf procedures) and precall and postcall
       hooks around calls to other procedures.  This is useful in capturing
       information on all procedures.
public static final java.lang.String ENABLE_PERFORMANCE_COLLECTION_NONE
public static final java.lang.String ENABLE_PERFORMANCE_COLLECTION_ENTRY_EXIT
public static final java.lang.String ENABLE_PERFORMANCE_COLLECTION_FULL
public static final java.lang.String PROFILING_DATA
PROFILING_DATA_NOCOLLECTION
    - No profiling data collection is enabled for this Java program.
PROFILING_DATA_COLLECTION
    - Profiling data collection is enabled for this Java program.  This
      enablement can only occur if the optimization of the Java program is
      30 or higher.  Also, collection does not occur until the profiling 
      data is applied.
PROFILING_DATA_APPLY
    - Profiling data collection is applied for this Java program.
PROFILING_DATA_CLEAR
    - All profiling data that has been collected for this Java program is to 
      be cleared.
public static final java.lang.String PROFILING_DATA_NOCOLLECTION
PROFILING_DATA, 
Constant Field Valuespublic static final java.lang.String PROFILING_DATA_COLLECTION
PROFILING_DATA, 
Constant Field Valuespublic static final java.lang.String PROFILING_DATA_APPLY
PROFILING_DATA, 
Constant Field Valuespublic static final java.lang.String PROFILING_DATA_CLEAR
PROFILING_DATA, 
Constant Field Valuespublic static final java.lang.String FILE_CHANGE
public static final java.lang.String JAVA_PROGRAMS
public static final java.lang.String JAVA_PROGRAM_CREATION
public static final java.lang.String JAVA_PROGRAM_SIZE
public static final java.lang.String LICENSED_INTERNAL_CODE_OPTIONS
public static final java.lang.String OPTIMIZATION
OPTIMIZATION_INTERPRET
    -  The Java program is not optimized.  When invoked, the Java program
       interprets the class file byte codes.  Variables can be displayed and
       modified while debugging.
OPTIMIZATION_10
    - The Java program contains a compiled version of the class file byte codes
      but has only minimal additional compiler optimization.  Variables can be
      displayed and modified while debugging.
OPTIMIZATION_20
    - The Java program contains a compiled version of the class file byte codes
      and has some additional compiler optimization.  Variables can be displayed
      but not modified while debugging.
OPTIMIZATION_30
    - The Java program contains a compiled version of the class file byte codes
      and has more compiler optimization than optimization level 20.  During a
      debug session, user variables cannot be changed, but can be displayed.
      The presented values may not be the current values of the variables.
OPTIMIZATION_40
    - The Java program contains a compiled version of the class file byte codes
      and has more compiler optimization than optimization level 30.  All call and
      instruction tracing is disabled.
public static final java.lang.Integer OPTIMIZATION_INTERPRET
OPTIMIZATIONpublic static final java.lang.Integer OPTIMIZATION_10
OPTIMIZATIONpublic static final java.lang.Integer OPTIMIZATION_20
OPTIMIZATIONpublic static final java.lang.Integer OPTIMIZATION_30
OPTIMIZATIONpublic static final java.lang.Integer OPTIMIZATION_40
OPTIMIZATIONpublic static final java.lang.String OWNER
public static final java.lang.String RELEASE_PROGRAM_CREATED_FOR
public static final java.lang.String USE_ADOPTED_AUTHORITY
public static final java.lang.String USER_PROFILE
USER_PROFILE_USER
    - Indicates that the authority checking that was done while
      this program is running should include only the user
      who is running the program.
USER_PROFILE_OWNER
    - Indicates that the authority checking that was done while
      this program is running should include both the use
      who is running the program and the program owner.
public static final java.lang.String USER_PROFILE_USER
USER_PROFILE, 
Constant Field Valuespublic static final java.lang.String USER_PROFILE_OWNER
USER_PROFILE, 
Constant Field Valuespublic RJavaProgram()
public RJavaProgram(AS400 system, java.lang.String path)
system - The system.path - The path.  This can be any class, jar, or zip file.protected void commitAttributeChanges(java.lang.Object[] attributeIDs,
                          java.lang.Object[] values)
                               throws ResourceException
commitAttributeChanges in class ChangeableResourceattributeIDs - The attribute IDs for the specified attribute changes.values - The specified attribute changesResourceException - If an error occurs.public void delete()
            throws ResourceException
ResourceException - If an error occurs.protected void establishConnection()
                            throws ResourceException
The method is called by the resource framework automatically when the connection needs to be established.
establishConnection in class ResourceResourceException - If an error occurs.protected void freezeProperties()
                         throws ResourceException
The method is called by the resource framework automatically when the properties need to be frozen.
freezeProperties in class ResourceResourceException - If an error occurs.public java.lang.Object getAttributeUnchangedValue(java.lang.Object attributeID)
                                            throws ResourceException
getAttributeUnchangedValue in class ChangeableResourceattributeID - Identifies the attribute.ResourceException - If an error occurs.public java.lang.String getPath()
public void refreshAttributeValues()
                            throws ResourceException
refreshAttributeValues in class ChangeableResourceResourceException - If an error occurs.public void setPath(java.lang.String path)
path - The path.  This can be any class, jar, or zip file.