299 lines
15 KiB
HTML
299 lines
15 KiB
HTML
|
|
<!doctype html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head><META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<title>Change Java Program (CHGJVAPGM)</title>
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<a name="CHGJVAPGM.Top_Of_Page"></a>
|
|
<h2>Change Java Program (CHGJVAPGM)</h2>
|
|
<table width="100%">
|
|
<tr>
|
|
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
|
|
<b>Threadsafe: </b>No
|
|
</td>
|
|
<td valign="top" align="right">
|
|
<a href="#CHGJVAPGM.PARAMETERS.TABLE">Parameters</a><br>
|
|
<a href="#CHGJVAPGM.COMMAND.EXAMPLES">Examples</a><br>
|
|
<a href="#CHGJVAPGM.ERROR.MESSAGES">Error messages</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div> <a name="CHGJVAPGM"></a>
|
|
<p>The Change Java Program (CHGJVAPGM) command changes attributes of Java programs(s) which are attached to Java class, ZIP, or JAR files.
|
|
</p>
|
|
<p>The attributes that can be changed are the performance collection attribute and the following attributes that can control the size and performance of the Java programs: the optimization attribute, and the Licensed Internal Code optimization options attributes.
|
|
</p>
|
|
<p>The CHGJVAPGM replaces existing Java programs only. Because of implicit creation of Java programs during run time, it is possible that only some classes in a ZIP or JAR file are represented in Java programs. This command will only change programs that already exist. The CRTJVAPGM command can be used to create programs for all classes in a ZIP or JAR file.
|
|
</p>
|
|
<p><b>Restrictions:</b> The file must be in one of the following file systems: QOpenSys, "root", or a user-defined file system.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGJVAPGM.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
|
|
<div>
|
|
<h3><a name="CHGJVAPGM.PARAMETERS.TABLE">Parameters</a></h3>
|
|
<table border="1" cellpadding="4" cellspacing="0">
|
|
<!-- col1="10" col2="15" col3="30" col4="10" -->
|
|
<tr>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
|
|
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CHGJVAPGM.CLSF"><b>CLSF</b></a></td>
|
|
<td valign="top">Class file or JAR file</td>
|
|
<td valign="top"><i>Path name</i></td>
|
|
<td valign="top">Required, Positional 1</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CHGJVAPGM.OPTIMIZE"><b>OPTIMIZE</b></a></td>
|
|
<td valign="top">Optimization</td>
|
|
<td valign="top">10, *INTERPRET, 20, 30, 40, <b><u>*SAME</u></b></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CHGJVAPGM.ENBPFRCOL"><b>ENBPFRCOL</b></a></td>
|
|
<td valign="top">Enable performance collection</td>
|
|
<td valign="top">*NONE, *ENTRYEXIT, *FULL, <b><u>*SAME</u></b></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CHGJVAPGM.PRFDTA"><b>PRFDTA</b></a></td>
|
|
<td valign="top">Profiling data</td>
|
|
<td valign="top"><b><u>*SAME</u></b>, *NOCOL, *COL, *CLR, *APY</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CHGJVAPGM.MERGE"><b>MERGE</b></a></td>
|
|
<td valign="top">Merge</td>
|
|
<td valign="top">*YES, <b><u>*RPL</u></b></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CHGJVAPGM.SUBTREE"><b>SUBTREE</b></a></td>
|
|
<td valign="top">Directory subtree</td>
|
|
<td valign="top"><b><u>*NONE</u></b>, *ALL</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#CHGJVAPGM.LICOPT"><b>LICOPT</b></a></td>
|
|
<td valign="top">Licensed Internal Code options</td>
|
|
<td valign="top"><i>Character value</i>, *OPTIMIZE, <b><u>*SAME</u></b></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGJVAPGM.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</div>
|
|
<div> <a name="CHGJVAPGM.CLSF"></a>
|
|
<h3>Class file or JAR file (CLSF)</h3>
|
|
<p>Specifies the class file, JAR file, or ZIP file name from which to change the Java program. The file name may be qualified by one or more directory names.
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>class-file-name</i></b></dt>
|
|
<dd>Specify the name of the class file or a pattern for identifying the class file or files to be used. A pattern can be specified in the last part of the name. An asterisk matches any number of characters and a question mark matches a single character. If the name is qualified or contains a pattern it must be enclosed in apostrophes. An example of a qualified class file name is '/directory1/directory2/myclassname.class'. An example of a pattern is '/directory1/directory2/myclass*.class'.
|
|
</dd>
|
|
<dt><b><i>JAR-file-name</i></b></dt>
|
|
<dd>Specify the name of the Java archive (JAR) file or pattern for identifying the JAR or ZIP file or files to be used. A file is assumed to be a JAR file if the file name ends with '.jar' or '.zip'. A pattern can be specified in the last part of the name. An asterisk matches any number of characters and a question mark matches a single character. If the name is qualified or contains a pattern it must be enclosed in apostrophes. An example of a qualified JAR file name is '/directory1/directory2/myappname.jar'. An example of a pattern is '/directory1/directory2/myapp*.zip'.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGJVAPGM.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CHGJVAPGM.OPTIMIZE"></a>
|
|
<h3>Optimization (OPTIMIZE)</h3>
|
|
<p>Specifies the optimization level of the Java program. For OPTIMIZE(*INTERPRET), the resulting Java program will be pre-verified and converted to an internal form. Then, it will be interpreted when it runs. For other optimization levels, the Java program contains server machine instruction sequences that are run when the Java program is invoked. These server machine instructions have been optimized based on the specified optimization level. The server directly runs the machine instructions when the program runs.
|
|
</p>
|
|
<p>OPTIMIZE(*INTERPRET) Java programs are smaller but run slower than Java programs created with higher optimization levels. As the optimization level is increased beyond 10, the Java program performance generally improves, but the time required to create the Java program increases and debugging is more difficult.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*SAME</u></b></dt>
|
|
<dd>The program optimization attribute does not change.
|
|
</dd>
|
|
<dt><b>10</b></dt>
|
|
<dd>The Java program contains a compiled version of the class byte codes but has only minimal additional compiler optimization. Variables can be displayed and modified while debugging.
|
|
</dd>
|
|
<dt><b>*INTERPRET</b></dt>
|
|
<dd>The Java program created does not contain machine specific instructions. The Java program is interpreted from the byte codes when it is started.. Variables can be displayed and modified while debugging.
|
|
</dd>
|
|
<dt><b>20</b></dt>
|
|
<dd>The Java program contains a compiled version of the class byte codes and has some additional compiler optimization. Variables can be displayed but not modified while debugging.
|
|
</dd>
|
|
<dt><b>30</b></dt>
|
|
<dd>The Java program contains a compiled version of the class 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.
|
|
</dd>
|
|
<dt><b>40</b></dt>
|
|
<dd>The Java program contains a compiled version of the class byte codes and has more compiler optimization than optimization level 30. All call and instruction tracing is disabled.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGJVAPGM.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CHGJVAPGM.ENBPFRCOL"></a>
|
|
<h3>Enable performance collection (ENBPFRCOL)</h3>
|
|
<p>Specifies whether collection of performance data is enabled.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*SAME</u></b></dt>
|
|
<dd>The performance data collection attribute does not change.
|
|
</dd>
|
|
<dt><b>*NONE</b></dt>
|
|
<dd>The collection of performance data is not enabled. No performance data is to be collected.
|
|
</dd>
|
|
<dt><b>*ENTRYEXIT</b></dt>
|
|
<dd>Performance data is collected for procedure entry and exit.
|
|
</dd>
|
|
<dt><b>*FULL</b></dt>
|
|
<dd>Performance data is collected for procedure entry and exit. Performance data is also collected before and after calls to external procedures.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGJVAPGM.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CHGJVAPGM.PRFDTA"></a>
|
|
<h3>Profiling data (PRFDTA)</h3>
|
|
<p>Specifies the program profiling data attribute for the module. Program profiling is an advanced optimization technique to reorder procedures and code within the procedures based on statistical data (profiling data)
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*SAME</u></b></dt>
|
|
<dd>The value does not change.
|
|
</dd>
|
|
<dt><b>*NOCOL</b></dt>
|
|
<dd>The Java program is not enabled to collect profiling data.
|
|
</dd>
|
|
<dt><b>*COL</b></dt>
|
|
<dd>This Java program is enabled to collect profiling data.
|
|
<p>
|
|
<b>Note: </b>*COL can be specified only when the optimization level of the Java program is 30 or greater and is not being changed.
|
|
</p>
|
|
</dd>
|
|
<dt><b>*CLR</b></dt>
|
|
<dd>All previously collected profiling data is discarded. The Java programs remain enabled to collect profiling data.
|
|
</dd>
|
|
<dt><b>*APY</b></dt>
|
|
<dd>Re-optimize the Java program(s) using the collected profile data.
|
|
<p>
|
|
<b>Note: </b>*APY may be specified only when the optimization level of the Java program is 30 or greater and is not being changed, and previously was *COL.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGJVAPGM.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CHGJVAPGM.MERGE"></a>
|
|
<h3>Merge (MERGE)</h3>
|
|
<p>Specifies whether the Java programs attached to a Java archive (JAR) file are to be merged into the minimum number of Java programs possible. This parameter is ignored if processing a Java class file.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*RPL</u></b></dt>
|
|
<dd>Specifies that Java programs attached to the JAR file will be merged only if the Java programs need to be recreated and replaced because other attributes are being changed. If no attributes are changed, and no Java programs need to be recreated and replaced, no merging of Java programs will occur.
|
|
</dd>
|
|
<dt><b>*YES</b></dt>
|
|
<dd>Merge all Java programs attached to a JAR file into the minimum number of Java programs possible. Java programs that contain applied profiling data and are not being recreated because of attributes being changed will not be merged because the resulting Java programs would not be optimized based on the applied profiling data.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGJVAPGM.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CHGJVAPGM.SUBTREE"></a>
|
|
<h3>Directory subtree (SUBTREE)</h3>
|
|
<p>Specifies whether directory subtrees are processed when looking for files that match the CLSF keyword.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>Only the files that match the object name pattern will be processed. No subtrees are processed. If the directory has subdirectories, neither the subdirectories nor the objects in the subdirectories are processed.
|
|
</dd>
|
|
<dt><b>*ALL</b></dt>
|
|
<dd>The entire subtree of the path specified in CLSF is processed to change java programs for files matching the name specified on CLSF parameter.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGJVAPGM.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="CHGJVAPGM.LICOPT"></a>
|
|
<h3>Licensed Internal Code options (LICOPT)</h3>
|
|
<p>Specifies one or more Licensed Internal Code compile-time options. This parameter allows individual compile-time options to be selected, and is intended for the advanced programmer who understands the potential benefits and drawbacks of each selected type of compiler option.
|
|
</p>
|
|
<p>Valid values are:
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*SAME</u></b></dt>
|
|
<dd>If recreation is not required, the licensed internal code options do not change. If other parameter values force the object to be recreated, the existing licensed internal code options will be used as input to the recreation. Depending on other parameter values and conditions, not all of the input LICOPT values might take effect.
|
|
</dd>
|
|
<dt><b>*OPTIMIZE</b></dt>
|
|
<dd>Use the set of compile-time options which are implicitly associated with the optimization level specified on the OPTIMIZE parameter. If OPTIMIZE(*INTERPRET) is specified, no compile-time optimizations will be performed.
|
|
</dd>
|
|
<dt><b><i>'Licensed-Internal-Code-options-string'</i></b></dt>
|
|
<dd>The selected Licensed Internal Code compile-time options are used when creating the Java program object. Certain options may reduce your ability to debug the created Java program.
|
|
<p>
|
|
<b>Note: </b>Additional information about the LICOPT options can be found in the IBM Developer Kit for Java reference in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.
|
|
</p>
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGJVAPGM.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="CHGJVAPGM.COMMAND.EXAMPLES">Examples</a> </h3>
|
|
<p><b>Example 1: Change a Java Program to Interpreted</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
CHGJVAPGM CLSF('/projectA/myJavaclassname.class')
|
|
OPTIMIZE(*INTERPRET)
|
|
</pre>
|
|
</p>
|
|
<p>This command will change the Java program associated with the class file myJavaclassname so that the Java program will interpret the class file byte codes when invoked via the RUNJVA (Run Java) or JAVA CL command. The Java program is re-created only if the attributes specified differ from those of the current program.
|
|
</p>
|
|
<p><b>Example 2: Change Optimized Java Programs in a JAR File</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
CHGJVAPGM CLSF('/projectA/myJavaAppfile.jar')
|
|
OPTIMIZE(10)
|
|
</pre>
|
|
</p>
|
|
<p>This command will change the Java programs associated with the Java archive (JAR) file myJavaAppfile. The Java program will contain compiled machine instruction sequences which will be run when the Java program is invoked by the RUNJVA (Run Java) or JAVA CL command.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGJVAPGM.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="CHGJVAPGM.ERROR.MESSAGES">Error messages</a> </h3>
|
|
<p><b><u>*ESCAPE Messages</u></b>
|
|
</p>
|
|
<dl>
|
|
<dt><b>JVAB524</b></dt>
|
|
<dd>&1 Java programs created, &4 with errors. &2 Java programs were current. &3 Java programs not created
|
|
</dd>
|
|
<dt><b>JVAB532</b></dt>
|
|
<dd>Unable to create Java program for "&1".
|
|
</dd>
|
|
<dt><b>JVAB535</b></dt>
|
|
<dd>Unmonitored exception received.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#CHGJVAPGM.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|