595 lines
24 KiB
HTML
595 lines
24 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>Run Java Program (RUNJVA)</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="RUNJVA.Top_Of_Page"></a>
|
|
<h2>Run Java Program (RUNJVA)</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="#RUNJVA.PARAMETERS.TABLE">Parameters</a><br>
|
|
<a href="#RUNJVA.COMMAND.EXAMPLES">Examples</a><br>
|
|
<a href="#RUNJVA.ERROR.MESSAGES">Error messages</a></td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div> <a name="RUNJVA"></a>
|
|
<p>The Run Java Program (JAVA) command runs the Java program associated with the specified Java class. If no Java program exists, one is created and associated with the class file.
|
|
</p>
|
|
<p>This command can operate on files in any file system that supports the integrated file system APIs.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
|
|
<div>
|
|
<h3><a name="RUNJVA.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="#RUNJVA.CLASS"><b>CLASS</b></a></td>
|
|
<td valign="top">Class file or JAR file</td>
|
|
<td valign="top"><i>Path name</i>, *VERSION</td>
|
|
<td valign="top">Required, Positional 1</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#RUNJVA.PARM"><b>PARM</b></a></td>
|
|
<td valign="top">Parameters</td>
|
|
<td valign="top">Single values: <b><u>*NONE</u></b><br>Other values (up to 200 repetitions): <i>Character value</i></td>
|
|
<td valign="top">Optional, Positional 2</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#RUNJVA.CLASSPATH"><b>CLASSPATH</b></a></td>
|
|
<td valign="top">Classpath</td>
|
|
<td valign="top"><i>Path name</i>, <b><u>*ENVVAR</u></b></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#RUNJVA.CHKPATH"><b>CHKPATH</b></a></td>
|
|
<td valign="top">Classpath security check level</td>
|
|
<td valign="top"><b><u>*WARN</u></b>, *SECURE, *IGNORE</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#RUNJVA.OPTIMIZE"><b>OPTIMIZE</b></a></td>
|
|
<td valign="top">Optimization</td>
|
|
<td valign="top"><b><u>*JIT</u></b>, *INTERPRET, 10, 20, 30, 40</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#RUNJVA.INTERPRET"><b>INTERPRET</b></a></td>
|
|
<td valign="top">Interpret</td>
|
|
<td valign="top"><b><u>*OPTIMIZE</u></b>, *YES, *NO, *JIT</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#RUNJVA.PROP"><b>PROP</b></a></td>
|
|
<td valign="top">Properties</td>
|
|
<td valign="top">Single values: <b><u>*NONE</u></b><br>Other values (up to 100 repetitions): <i>Element list</i></td>
|
|
<td valign="top" rowspan="3">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 1: Property name</td>
|
|
<td valign="top">
|
|
<i>Path name</i></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 2: Property value</td>
|
|
<td valign="top">
|
|
<i>Character value</i>, <b><u>*NONE</u></b></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#RUNJVA.GCHINL"><b>GCHINL</b></a></td>
|
|
<td valign="top">Garbage collect initial size</td>
|
|
<td valign="top">256-240000000, <b><u>*DFT</u></b></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#RUNJVA.GCHMAX"><b>GCHMAX</b></a></td>
|
|
<td valign="top">Garbage collect maximum size</td>
|
|
<td valign="top">256-240000000, <b><u>*DFT</u></b>, *NOMAX</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#RUNJVA.GCFRQ"><b>GCFRQ</b></a></td>
|
|
<td valign="top">Garbage collection frequency</td>
|
|
<td valign="top">0-100, <b><u>50</u></b></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#RUNJVA.GCPTY"><b>GCPTY</b></a></td>
|
|
<td valign="top">Garbage collection priority</td>
|
|
<td valign="top"><b><u>20</u></b>, 10, 30</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#RUNJVA.OPTION"><b>OPTION</b></a></td>
|
|
<td valign="top">Option</td>
|
|
<td valign="top">Values (up to 4 repetitions): <b><u>*NONE</u></b>, *VERBOSE, *DEBUG, *VERBOSEGC, *NOCLASSGC</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top"><a href="#RUNJVA.JOB"><b>JOB</b></a></td>
|
|
<td valign="top">Job name</td>
|
|
<td valign="top"><i>Name</i>, <b><u>QJVACMDSRV</u></b>, *GEN</td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#RUNJVA.AGTPGM"><b>AGTPGM</b></a></td>
|
|
<td valign="top">Agent program</td>
|
|
<td valign="top">Single values: <b><u>*NONE</u></b><br>Other values: <i>Qualified object name</i></td>
|
|
<td valign="top" rowspan="3">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Qualifier 1: Agent program</td>
|
|
<td valign="top"><i>Name</i></td>
|
|
</tr><tr>
|
|
<td valign="top">Qualifier 2: Library</td>
|
|
<td valign="top"><i>Name</i>, <b><u>*LIBL</u></b>, *CURLIB</td>
|
|
</tr><tr>
|
|
<td valign="top"><a href="#RUNJVA.AGTOPTIONS"><b>AGTOPTIONS</b></a></td>
|
|
<td valign="top">Agent options</td>
|
|
<td valign="top"><i>Character value</i>, <b><u>*NONE</u></b></td>
|
|
<td valign="top">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" rowspan="3"><a href="#RUNJVA.OUTPUT"><b>OUTPUT</b></a></td>
|
|
<td valign="top">Output</td>
|
|
<td valign="top">Single values: *PRINT, *NONE<br>Other values: <i>Element list</i></td>
|
|
<td valign="top" rowspan="3">Optional</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 1: Destination</td>
|
|
<td valign="top">
|
|
<b><u>*</u></b></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top">Element 2: Program end action</td>
|
|
<td valign="top">
|
|
<b><u>*PAUSE</u></b>, *CONTINUE</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</div>
|
|
<div> <a name="RUNJVA.CLASS"></a>
|
|
<h3>Class file or JAR file (CLASS)</h3>
|
|
<p>Specifies the class name or jar file to be run. The class name may be qualified by one or more package names. Each package name must be followed by a period. For example, CLASS('pkg1.pkg2.myclass') identifies a class qualified by two package names.
|
|
</p>
|
|
<p>A jar file name may be specified only when running JDK 1.2 or higher. The start up class must be indicated by the Main-Class in the manifest header.
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>class-name</i></b></dt>
|
|
<dd>Specify the name of the class to be run.
|
|
</dd>
|
|
<dt><b><i>jar-name</i></b></dt>
|
|
<dd>Specify the name of the jar file with the Main-Class specified in the manifest.
|
|
</dd>
|
|
<dt><b>*VERSION</b></dt>
|
|
<dd>The build version information for the Java Development Kit (JDK) and the Java Virtual Machine (JVM) is displayed. No Java program is run.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.PARM"></a>
|
|
<h3>Parameters (PARM)</h3>
|
|
<p>Specifies one or more parameter values that are passed to the Java program. A maximum of 200 parameter values can be passed.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>There are no input parameters to the Java program.
|
|
</dd>
|
|
<dt><b><i>parameter-value</i></b></dt>
|
|
<dd>Specify the parameter value to be passed to the Java program.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.CLASSPATH"></a>
|
|
<h3>Classpath (CLASSPATH)</h3>
|
|
<p>Specifies the path used to locate classes. Directories are separated by colons.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*ENVVAR</u></b></dt>
|
|
<dd>The class path is determined by the environment variable CLASSPATH.
|
|
</dd>
|
|
<dt><b><i>class-path</i></b></dt>
|
|
<dd>Path used to locate classes. An example class path is '/directory1/directory2:/QIBM/ProdData/Java400'.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.CHKPATH"></a>
|
|
<h3>Classpath security check level (CHKPATH)</h3>
|
|
<p>Specifies the level of warnings given for directories in the CLASSPATH that have public write authority. A directory in the CLASSPATH that has public write authority is a security exposure because it may contain a class file with the same name as the one you want to run. Whichever class file is found first is run.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*WARN</u></b></dt>
|
|
<dd>A warning message is sent for each directory in the CLASSPATH that has public write authority.
|
|
</dd>
|
|
<dt><b>*SECURE</b></dt>
|
|
<dd>A warning message is sent for each directory in the CLASSPATH that has public write authority. If one or more warning messages are sent, an escape message is sent and the Java program is not run.
|
|
</dd>
|
|
<dt><b>*IGNORE</b></dt>
|
|
<dd>Ignore the fact that directories in the CLASSPATH may have public write authority. No warnings messages are sent.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.OPTIMIZE"></a>
|
|
<h3>Optimization (OPTIMIZE)</h3>
|
|
<p>Specifies how to treat class files if no Java program is associated with the file.
|
|
</p>
|
|
<p>For 10,20,30,40 this specifies the optimization level of the Java program which will be created if no Java program is associated with the Java class file. The Java program will contain machine instruction sequences that are run when the Java program is invoked and will remain associated with the class file after the Java program has been run.
|
|
</p>
|
|
<p>If the Java class file is determined to be downlevel or out of date, a new Java program will be created using the optimization level that was used when the previous Java program was created, instead of the value specified for this parameter.
|
|
</p>
|
|
<p>For OPTIMIZE(*INTERPRET), the resulting Java program interprets the class byte codes when invoked.
|
|
</p>
|
|
<p>OPTIMIZE(*INTERPRET) Java programs will be smaller but will run slower than Java programs created with higher optimization levels. As you increase the optimization level beyond 10, the Java program performance will generally improve, but the time required to create the Java program will increase and you will have less ability to debug the Java program.
|
|
</p>
|
|
<p>For OPTIMIZE(*JIT), no Java program containing machine instruction sequences is created if no program is associated with the class file. Rather, the class is run using the Just In Time compiler (JIT).
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*JIT</u></b></dt>
|
|
<dd>No Java program containing machine instruction sequences is created. The class is run using the Just In Time compiler (JIT).
|
|
</dd>
|
|
<dt><b>*INTERPRET</b></dt>
|
|
<dd>The Java program created does not contain machine specific instructions. It will be interpreted when the program is started. Variables can be displayed and modified while debugging.
|
|
<p>If *OPTIMIZE is specified for the <b>Interpret (INTERPRET)</b> parameter, all of the classes that run will be run interpreted even if there is an optimized Java program associated with the class.
|
|
</p>
|
|
</dd>
|
|
<dt><b>10</b></dt>
|
|
<dd>The Java program contains a compiled version of the class file byte codes and has only minimal additional compiler optimization. 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 file 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 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.
|
|
</dd>
|
|
<dt><b>40</b></dt>
|
|
<dd>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.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.INTERPRET"></a>
|
|
<h3>Interpret (INTERPRET)</h3>
|
|
<p>Specifies how the Java class files should be run.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*OPTIMIZE</u></b></dt>
|
|
<dd>Whether all Java classes are run interpretively depends on the value specified for the OPTIMIZE parameter. If OPTIMIZE(*INTERPRET) was specified, all Java classes will be run interpretively. If any other value was specified for the OPTIMIZE parameter, only Java classes with Java programs created using CRTJVAPGM command and specifying OPTIMIZE(*INTERPRET) will be run interpretively.
|
|
</dd>
|
|
<dt><b>*YES</b></dt>
|
|
<dd>All Java classes will be run interpretively regardless of the OPTIMIZE value associated Java program. Java classes that need a Java program created will use the optimization level specified in the OPTIMIZE parameter.
|
|
</dd>
|
|
<dt><b>*NO</b></dt>
|
|
<dd>Only Java classes with Java programs created using CRTJVAPGM command and specifying OPTIMIZE(*INTERPRET) will be run interpretively. Java classes that need a Java program created will be created with the optimization level specified in the OPTIMIZE parameter.
|
|
</dd>
|
|
<dt><b>*JIT</b></dt>
|
|
<dd>All Java class files will be run using the Just In Time compiler (JIT), regardless of what OPTIMIZE value was used when the associated Java program was created.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.PROP"></a>
|
|
<h3>Properties (PROP)</h3>
|
|
<p>Specifies a list of values to assign to Java properties. Up to 100 properties can have a value assigned.
|
|
</p>
|
|
<p><b>Single values</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>No properties are specified.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Element 1: Property name</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>property-name</i></b></dt>
|
|
<dd>Specify the name of the property to be changed.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Element 2: Property value</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>property-value</i></b></dt>
|
|
<dd>Specify the value to be assigned to the property.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.GCHINL"></a>
|
|
<h3>Garbage collect initial size (GCHINL)</h3>
|
|
<p>Specifies the initial size, in kilobytes, of the garbage collection heap. This is used to prevent garbage collection from starting on small programs.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*DFT</u></b></dt>
|
|
<dd>The default initial size is 16384 kilobytes unless it is overridden by a property.
|
|
</dd>
|
|
<dt><b><i>256-240000000</i></b></dt>
|
|
<dd>Specify the initial size, in kilobytes, of the garbage collection heap. It is recommended that the initial heap size be set to 16384 kilobytes (the default) or larger.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.GCHMAX"></a>
|
|
<h3>Garbage collect maximum size (GCHMAX)</h3>
|
|
<p>Specifies the maximum size, in kilobytes, that the garbage collection heap can grow to. This is used to prevent runaway programs that consume all of the available storage. Normally, garbage collection runs as an asynchronous thread in parallel with other threads. If the maximum size is reached, all other threads are stopped while garbage collection takes place. This may adversely affect performance.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*DFT</u></b></dt>
|
|
<dd>The default for the parameter is used. The default maximum is determined by the system unless a property is specified. The heap will grow until all system resources are depleted. Then a synchronous garbage collection is started to reclaim resources no longer in use.
|
|
</dd>
|
|
<dt><b>*NOMAX</b></dt>
|
|
<dd>The maximum size is not specified by the user. The maximum is determined by the system. The heap will grow until all system resources are depleted. Then a synchronous garbage collection is started to reclaim resources no longer in use.
|
|
</dd>
|
|
<dt><b><i>256-240000000</i></b></dt>
|
|
<dd>Specify the size, in kilobytes, that the garbage collection heap can grow to.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.GCFRQ"></a>
|
|
<h3>Garbage collection frequency (GCFRQ)</h3>
|
|
<p>Specifies the relative frequency that garbage collection runs.
|
|
</p>
|
|
<p>This parameter is no longer supported. It exists solely for compatibility with the releases earlier than Version 4 Release 3 Modification 0 of the server.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.GCPTY"></a>
|
|
<h3>Garbage collection priority (GCPTY)</h3>
|
|
<p>Specifies the priority of the tasks running garbage collection.
|
|
</p>
|
|
<p>This parameter is no longer supported. It exists solely for compatibility with the releases earlier than Version 4 Release 3 Modification 0 of the server.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.OPTION"></a>
|
|
<h3>Option (OPTION)</h3>
|
|
<p>Specifies special options used when running the Java class.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>No special options are used when running the Java class.
|
|
</dd>
|
|
<dt><b>*VERBOSE</b></dt>
|
|
<dd>A message is displayed each time a class file is loaded.
|
|
</dd>
|
|
<dt><b>*DEBUG</b></dt>
|
|
<dd>Allows the system debugger to be used for this Java program. This value cannot be used with the JIT compiler. That is, *DEBUG is mutually exclusive with INTERPRET(*JIT). Also, *DEBUG cannot be used when a JAR file is specified for the CLASS keyword.
|
|
</dd>
|
|
<dt><b>*VERBOSEGC</b></dt>
|
|
<dd>A message is displayed for each garbage collection sweep.
|
|
</dd>
|
|
<dt><b>*NOCLASSGC</b></dt>
|
|
<dd>Unused classes are not reclaimed when garbage collection is run.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.JOB"></a>
|
|
<h3>Job name (JOB)</h3>
|
|
<p>Specifies the name that is associated with the batch immediate (BCI) job that is started when this command is run. The BCI job is where the Java program will be run.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>QJVACMDSRV</u></b></dt>
|
|
<dd>The job name for the BCI job will be QJVACMDSRV.
|
|
</dd>
|
|
<dt><b>*GEN</b></dt>
|
|
<dd>The job name is generated from the class name.
|
|
</dd>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name to be used for the BCI job that is used to run the Java program.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.AGTPGM"></a>
|
|
<h3>Agent program (AGTPGM)</h3>
|
|
<p>Specifies an ILE service program or i5/OS PASE program that contains a virtual machine (VM) agent. For example, a VM agent can be a remote debugger or profiler. The VM loads the agent program and looks for the entry point:
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
jint JNICALL JVM_OnLoad(JavaVM *jvm, char *options, void *reserved);
|
|
</pre>
|
|
</p>
|
|
<p>The VM calls the JVM_OnLoad function, passing a pointer to the JavaVM instance as the first argument, and the character string specified in the AGTOPTIONS parameter as the second argument. The third argument to JVM_OnLoad is reserved and set to NULL.
|
|
</p>
|
|
<p><b>Single values</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>No VM agent program is specified.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Qualifier 1: Agent program</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the VM agent program.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Qualifier 2: Library</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*LIBL</u></b></dt>
|
|
<dd>All libraries in the library list for the current thread are searched until the first match is found. If the VM agent is an i5/OS PASE program, the directories contained in the LIBPATH and PASE_LIBPATH environment variables are used to locate the program.
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><b>*CURLIB</b></dt>
|
|
<dd>The current library for the thread is searched. If no library is specified as the current library for the thread, the QGPL library is searched.
|
|
</dd>
|
|
</dl>
|
|
<dl>
|
|
<dt><b><i>name</i></b></dt>
|
|
<dd>Specify the name of the library to be searched.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.AGTOPTIONS"></a>
|
|
<h3>Agent options (AGTOPTIONS)</h3>
|
|
<p>Specifies a character string of the virtual machine (VM) agent options. A pointer to this character string will be passed as the second argument to the JVM_OnLoad function in the VM agent program specified in the AGTPGM parameter. The format of the options string is determined by the agent program.
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*NONE</u></b></dt>
|
|
<dd>No options are specified. A NULL options argument will be passed to the JVM_OnLoad function.
|
|
</dd>
|
|
<dt><b><i>character-value</i></b></dt>
|
|
<dd>Specify the options string to be passed to the VM agent program on start-up.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<div> <a name="RUNJVA.OUTPUT"></a>
|
|
<h3>Output (OUTPUT)</h3>
|
|
<p>Specifies where output from the Java program should be sent and, if output is directed to the Java shell display, whether the shell display panel should go away when the Java program ends.
|
|
</p>
|
|
<p><b>Single values</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b>*PRINT</b></dt>
|
|
<dd>The Java program output is sent to a spooled file through the QPRINT printer device file.
|
|
</dd>
|
|
<dt><b>*NONE</b></dt>
|
|
<dd>The Java program output is discarded.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Element 1: Destination</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*</u></b></dt>
|
|
<dd>A Java shell display panel will be used to display output if the Java program is run from an interactive job. If the Java program is run in a batch job, the Java program output is sent to a spooled file through the QPRINT printer device file.
|
|
</dd>
|
|
</dl>
|
|
<p><b>Element 2: Program end action</b>
|
|
</p>
|
|
<dl>
|
|
<dt><b><u>*PAUSE</u></b></dt>
|
|
<dd>The Java shell display panel is shown until the F3, F12, or Enter key is pressed.
|
|
</dd>
|
|
<dt><b>*CONTINUE</b></dt>
|
|
<dd>The Java shell display panel is closed (goes away) when the Java program ends.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="RUNJVA.COMMAND.EXAMPLES">Examples</a> </h3>
|
|
<p><b>Example 1: Run a Java Program</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
JAVA CLASS('projectA.myJavaclassname')
|
|
</pre>
|
|
</p>
|
|
<p>This command will run the iSeries Java program associated with the class <i>myJavaclassname</i>. The job name of the batch immediate (BCI) job where the Java program will run will be QJVACMDSRV.
|
|
</p>
|
|
<p><b>Example 2: Generate the Job Name for the Java Program</b>
|
|
</p>
|
|
<p>
|
|
<pre>
|
|
JAVA CLASS('projectA.myJavaclassname') JOB(*GEN)
|
|
</pre>
|
|
</p>
|
|
<p>This command will run the iSeries Java program associated with the class <i>myJavaclassname</i>. The job name of the batch immediate (BCI) job where the Java program will run will be MYJAVACLAS.
|
|
</p>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
<hr size="2" width="100%">
|
|
<div><h3><a name="RUNJVA.ERROR.MESSAGES">Error messages</a> </h3>
|
|
<p><b><u>*ESCAPE Messages</u></b>
|
|
</p>
|
|
<dl>
|
|
<dt><b>JVAB534</b></dt>
|
|
<dd>Unable to complete Java program "&1".
|
|
</dd>
|
|
<dt><b>JVAB535</b></dt>
|
|
<dd>Unmonitored exception received.
|
|
</dd>
|
|
<dt><b>JVAB537</b></dt>
|
|
<dd>Java shell already active in job.
|
|
</dd>
|
|
<dt><b>JVAB538</b></dt>
|
|
<dd>Error occurred when running Java shell.
|
|
</dd>
|
|
<dt><b>JVAB539</b></dt>
|
|
<dd>Unable to start system debugger.
|
|
</dd>
|
|
<dt><b>JVAB53A</b></dt>
|
|
<dd>Unable to start Java shell, reason code &1.
|
|
</dd>
|
|
<dt><b>JVAB53B</b></dt>
|
|
<dd>Java processing canceled.
|
|
</dd>
|
|
<dt><b>JVAB53D</b></dt>
|
|
<dd>Java Development Kit could not be found.
|
|
</dd>
|
|
<dt><b>JVAB546</b></dt>
|
|
<dd>Error detected while running java in batch mode.
|
|
</dd>
|
|
</dl>
|
|
</div>
|
|
<table width="100%">
|
|
<tr><td align="right"><a href="#RUNJVA.Top_Of_Page">Top</a></td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|