ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaha_5.4.0.1/transfor.htm

84 lines
5.7 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="Static compilation" />
<meta name="abstract" content="The Java transformer is an IBM i5/OS component that preprocesses class files to prepare them to run using the iSeries Java virtual machine. The Java transformer creates an optimized program object that is persistent and is associated with the class file." />
<meta name="description" content="The Java transformer is an IBM i5/OS component that preprocesses class files to prepare them to run using the iSeries Java virtual machine. The Java transformer creates an optimized program object that is persistent and is associated with the class file." />
<meta name="DC.Relation" scheme="URI" content="runtperf.htm" />
<meta name="DC.Relation" scheme="URI" content="tranperf.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="transfor" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Static compilation</title>
</head>
<body id="transfor"><a name="transfor"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Static compilation</h1>
<div><p>The Java™ transformer is an IBM<sup>®</sup> <span class="keyword">i5/OS™</span> component
that preprocesses class files to prepare them to run using the iSeries™ Java virtual
machine. The Java transformer creates an optimized program object
that is persistent and is associated with the class file.</p>
<p> In the default case, the program object contains a compiled, 64-bit RISC
machine instruction version of the class. The Java interpreter does not interpret the
optimized program object at runtime. Instead, it directly runs when the class
file is loaded.</p>
<p>Java programs
are optimized using the JIT by default. To use the Java transformer, you either do CRTJVAPGM,
or specify the use of the transformer on the RUNJVA or JAVA command.</p>
<p>You can use the <a href="../cl/crtjvapgm.htm" target="_blank">Create Java Program
(CRTJVAPGM) command</a> to explicitly start the Java transformer. The CRTJVAPGM command
optimizes the class file or JAR file while the command runs, so nothing needs
to be done while the program is running. This improves the speed of the program
the first time that it runs. Using the CRTJVAPGM command, instead of relying
on default optimization, ensures the best optimization possible and also improves
the use of space for the Java programs that are associated with the
class file or JAR file.</p>
<p>Using the CRTJVAPGM command on a class file, JAR file, or ZIP file causes
all the classes in the file to be optimized, and the resulting Java program
object are persistent. This results in better runtime performance. You can
also change the optimization level or select an optimization level other than
the default of 10 by using the CRTJVAPGM command or the <a href="../cl/chgjvapgm.htm" target="_blank">Change Java Program (CHGJVAPGM)</a> command.
At optimization level 40, interclass binding is performed between the classes
within a JAR file, and in some cases, the classes are inlined. Interclass
binding improves the call speed. Inlining removes the overhead of a method
call entirely. In some cases, you can inline methods between classes within
the JAR file or ZIP file. Specifying <samp class="codeph">OPTIMIZE(*INTERPRET)</samp> on
the CRTJVAPGM command causes any classes that are specified on the command
to be verified and prepared to run in interpreted mode.</p>
<p>The <a href="../cl/runjva.htm" target="_blank">Run Java (RUNJVA)
command</a> can also specify OPTIMIZE(*INTERPRET). This parameter specifies
that any classes running under the Java virtual machine are interpreted, regardless
of the optimization level of the associated program object. This is useful
when debugging a class that was transformed with an optimization level of
40. To force interpretation, use INTERPRET(*YES).</p>
<p> See "Using cache for user class loaders" in <a href="runtperf.htm">Java performance
considerations</a> for information on reusing your Java programs
created by class loaders.</p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="tranperf.htm">Java static compilation performance considerations</a></strong><br />
You can determine the speed of transformation by the optimization level that you set.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="runtperf.htm" title="Understanding the following considerations can help you improve the performance of your Java applications.">Java performance considerations</a></div>
</div>
</div>
</body>
</html>