Serializablepublic class JavaProgram extends Object implements Serializable
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:
// 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();
| Modifier and Type | Field | Description |
|---|---|---|
static String |
ADOPTED_AUTHORITY_PROFILE_OWNER |
Constant indicating that the profile to use when the use adopted authority field is set is *OWNER.
|
static String |
ADOPTED_AUTHORITY_PROFILE_USER |
Constant indicating that the profile to use when the use adopted authority field is set is *USER.
|
static String |
PERFORMANCE_COLLECTION_TYPE_ENTRYEXIT |
Constant indicating the type of performance collection is *ENTRYEXIT.
|
static String |
PERFORMANCE_COLLECTION_TYPE_FULL |
Constant indicating the type of performance collection is *FULL.
|
static String |
PROFILING_DATA_STATUS_APY |
Constant indicating that profile data has been applied to the attached Java program(s).
|
static String |
PROFILING_DATA_STATUS_COL |
Constant indicating that profile data collection is enabled for the attached Java program(s).
|
static String |
PROFILING_DATA_STATUS_NOCOL |
Constant indicating that profile data collection is not enabled for the the Java program(s).
|
| Constructor | Description |
|---|---|
JavaProgram() |
Creates a JavaProgram
|
JavaProgram(AS400 system,
String path) |
Creates a JavaProgram
|
| Modifier and Type | Method | Description |
|---|---|---|
String |
getAdoptedAuthorityProfile() |
Returns the profile to use when the "Use Adopted Authority" field is set.
|
Date |
getFileChangeDate() |
Returns the date and time the file was last modified or changed.
|
String |
getFileOwner() |
Returns the name of the owner of the file.
|
Date |
getJavaProgramCreationDate() |
Returns the date and time the Java program was created for the file.
|
String |
getJavaProgramVersion() |
Returns the IBM i version the Java program was created for.
|
String |
getLICOptions() |
Returns the LIC options string specified when the java program was last modified.
|
int |
getNumberOfAttachedPrograms() |
Returns the number of Java prgroams attached to the .class or .jar/sip file.
|
int |
getNumberOfClasses() |
Returns the number of classes.
|
int |
getNumberOfClassesWithCurrentJavaPrograms() |
Returns the number of classes with representations up-to-date in the attached Java programs.
|
int |
getNumberOfClassesWithErrors() |
Returns the number of classes containing errors.
|
int |
getNumberOfClassesWithoutCurrentJavaPrograms() |
Returns the number of classes with representations out-of-date.
|
int |
getOptimizationLevel() |
Returns the optimization level used to create the java program.
|
String |
getPath() |
Returns the path to a class, jar, or zip file used to create the Java program.
|
String |
getPerformanceCollectionEnabledFlag() |
Returns whether or not performance collection is enabled.
|
String |
getPerformanceCollectionType() |
Returns the type of performance collection if the performance collection flag is set.
|
String |
getProfilingDataStatus() |
Returns whether profiling data is enabled or applied.
|
int |
getSizeOfAttachedJavaPrograms() |
Returns the size in kilobytes of all the attached java programs.
|
AS400 |
getSystem() |
Returns the name of the system.
|
boolean |
isUseAdoptedAuthority() |
Returns whether or not the used adopted authority is set.
|
void |
refresh() |
Refreshes all the values for this PTF by retrieving them from the system.
|
void |
setPath(String path) |
Sets the qualified path name to use.
|
void |
setSystem(AS400 system) |
Sets the name of the system to search for a Java Program.
|
public static final String ADOPTED_AUTHORITY_PROFILE_USER
public static final String ADOPTED_AUTHORITY_PROFILE_OWNER
public static final String PERFORMANCE_COLLECTION_TYPE_ENTRYEXIT
public static final String PERFORMANCE_COLLECTION_TYPE_FULL
public static final String PROFILING_DATA_STATUS_NOCOL
public static final String PROFILING_DATA_STATUS_COL
public static final String PROFILING_DATA_STATUS_APY
public AS400 getSystem()
public String getPath()
public String getAdoptedAuthorityProfile() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public Date getFileChangeDate() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public String getFileOwner() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public Date getJavaProgramCreationDate() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public String getJavaProgramVersion() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public int getNumberOfClasses()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
InterruptedException,
IOException,
ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public int getNumberOfClassesWithCurrentJavaPrograms()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
InterruptedException,
IOException,
ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public int getNumberOfClassesWithErrors()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
InterruptedException,
IOException,
ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public int getNumberOfClassesWithoutCurrentJavaPrograms()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
InterruptedException,
IOException,
ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public int getNumberOfAttachedPrograms()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
InterruptedException,
IOException,
ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public int getOptimizationLevel()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
InterruptedException,
IOException,
ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public String getPerformanceCollectionEnabledFlag() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public String getPerformanceCollectionType() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public boolean isUseAdoptedAuthority()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
InterruptedException,
IOException,
ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public int getSizeOfAttachedJavaPrograms()
throws AS400Exception,
AS400SecurityException,
ErrorCompletingRequestException,
InterruptedException,
IOException,
ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public String getProfilingDataStatus() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public String getLICOptions() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, InterruptedException, IOException, ObjectDoesNotExistException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.IOException - If an error occurs while communicating with the system.ObjectDoesNotExistException - If the object does not exist.public void refresh()
throws AS400Exception,
AS400SecurityException,
ConnectionDroppedException,
ErrorCompletingRequestException,
InterruptedException,
ObjectDoesNotExistException,
IOException,
UnsupportedEncodingException
AS400Exception - If an error occurs.AS400SecurityException - If a security or authority error occurs.ConnectionDroppedException - If the connection is dropped.ErrorCompletingRequestException - If an error occurs before the request is completed.InterruptedException - If this thread is interrupted.ObjectDoesNotExistException - If the object does not exist.IOException - If an error occurs while communicating with the system.UnsupportedEncodingException - If the Character Encoding is not supported.public void setSystem(AS400 system)
system - The systempublic void setPath(String path)
path - - the qualified path name.Copyright © 2024. All rights reserved.