124 lines
7.8 KiB
HTML
124 lines
7.8 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="Debug Java programs from an i5/OS command line" />
|
||
|
<meta name="abstract" content="To debug Java programs from the i5/OS command line, select one of the options listed here." />
|
||
|
<meta name="description" content="To debug Java programs from the i5/OS command line, select one of the options listed here." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="debugmain.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="debugpro.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="debnm.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="debother.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="debugcla.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="debserv.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="jpdebuga.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="findleak.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="debug" />
|
||
|
<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>Debug Java programs from an i5/OS command
|
||
|
line</title>
|
||
|
</head>
|
||
|
<body id="debug"><a name="debug"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Debug Java programs from an <span class="keyword">i5/OS</span> command
|
||
|
line</h1>
|
||
|
<div><p>To debug Java™ programs from the <span class="keyword">i5/OS™</span> command
|
||
|
line, select one of the options listed here.</p>
|
||
|
<ul><li><a href="debugpro.htm">Debug a Java program</a></li>
|
||
|
<li><a href="debnm.htm">Debug Java and native method programs</a></li>
|
||
|
<li><a href="debother.htm">Debug a Java program from another display</a></li>
|
||
|
<li><a href="debugcla.htm">Debug Java classes loaded through a custom class
|
||
|
loader</a></li>
|
||
|
<li><a href="debserv.htm">Debug servlets</a></li>
|
||
|
</ul>
|
||
|
<p>When you debug a Java program, your Java program
|
||
|
is actually running in the Java virtual machine in a batch immediate
|
||
|
(BCI) job. Your source code displays in the interactive display, but the Java program
|
||
|
is not running there. It is running in the other job, which is a serviced
|
||
|
job. When your Java program ends, the serviced job ends, and a message
|
||
|
displays, stating that <samp class="codeph">Job being serviced ended</samp>.</p>
|
||
|
<p>It is not possible to debug Java programs running with the Just-In-Time
|
||
|
(JIT) compiler. If a file does not have an associated Java program,
|
||
|
the default is to run the JIT. This can be disabled in several ways to allow
|
||
|
debugging:</p>
|
||
|
<ul><li>Specify the property <samp class="codeph">java.compiler=NONE</samp> when starting
|
||
|
the Java virtual
|
||
|
machine.</li>
|
||
|
<li>Specify OPTION(*DEBUG) on the Run Java (RUNJVA) command.</li>
|
||
|
<li>Specify INTERPRET(*YES) on the Run Java (RUNJVA) command.</li>
|
||
|
<li>Use CRTJVAPGM OPTIMIZATION(10) to create an associated Java program
|
||
|
before the Java virtual machine is started. <div class="note"><span class="notetitle">Note:</span> None of these
|
||
|
solutions affect a running Java virtual machine. If a Java virtual
|
||
|
machine was not started with one of these alternatives, it must be stopped
|
||
|
and restarted to be debugged.</div>
|
||
|
</li>
|
||
|
</ul>
|
||
|
<p>The interface between the two jobs is established when you specify the
|
||
|
*DEBUG option on the Run Java (RUNJVA) command.</p>
|
||
|
<p>For more information about the system debugger, see <a href="../books/sc092712.pdf" target="_blank">WebSphere<sup>®</sup> Development Studio: ILE
|
||
|
C/C++ Programmer's Guide, SC09-2712-04</a> and online help information.</p>
|
||
|
</div>
|
||
|
<div>
|
||
|
<ul class="ullinks">
|
||
|
<li class="ulchildlink"><strong><a href="debugpro.htm">Debug a Java program</a></strong><br />
|
||
|
The easiest way to debug Java programs that run on your iSeries™ server
|
||
|
is to use the IBM<sup>®</sup> iSeries™ System
|
||
|
Debugger. IBM<sup>®</sup> iSeries™ System
|
||
|
Debugger provides a graphical user interface that enables you to more easily
|
||
|
use the debugging capabilities of your iSeries™ server.</li>
|
||
|
<li class="ulchildlink"><strong><a href="debnm.htm">Debug Java and native method programs</a></strong><br />
|
||
|
You can debug Java programs and native method programs
|
||
|
at the same time. While you are debugging your source on the interactive display,
|
||
|
you can debug a native method that is programmed in C, which is within a service
|
||
|
program (*SRVPGM). The *SRVPGM must be compiled and created with debug data.</li>
|
||
|
<li class="ulchildlink"><strong><a href="debother.htm">Debug a Java program from another display</a></strong><br />
|
||
|
The easiest way to debug Java programs that run on your iSeries™ server
|
||
|
is to use the IBM<sup>®</sup> iSeries™ System
|
||
|
Debugger. The IBM<sup>®</sup> iSeries™ System
|
||
|
Debugger provides a graphical user interface that enables you to more easily
|
||
|
use the debugging capabilities of your iSeries™ server.</li>
|
||
|
<li class="ulchildlink"><strong><a href="debugcla.htm">Debug Java classes loaded through a custom class loader</a></strong><br />
|
||
|
The easiest way to debug Java programs that run on your iSeries™ server
|
||
|
is to use the IBM<sup>®</sup> iSeries™ System
|
||
|
Debugger. The IBM<sup>®</sup> iSeries™ System
|
||
|
Debugger provides a graphical user interface that enables you to more easily
|
||
|
use the debugging capabilities of your iSeries™ server.</li>
|
||
|
<li class="ulchildlink"><strong><a href="debserv.htm">Debug servlets</a></strong><br />
|
||
|
Debugging servlets is a special case of debugging classes loaded
|
||
|
through a custom class loader. Servlets run in the Java runtime of the IBM<sup>®</sup> HTTP Server. You have several options
|
||
|
to debug servlets.</li>
|
||
|
<li class="ulchildlink"><strong><a href="jpdebuga.htm">Java Platform Debugger Architecture</a></strong><br />
|
||
|
The Java Platform Debugger Architecture (JPDA) consists
|
||
|
of the JVM Debug Interface/JVM Tool Interface, the Java Debug Wire Protocol, and the Java Debug
|
||
|
Interface. All these parts of the JPDA enable any front end of a debugger
|
||
|
that uses the JDWP to perform debugging operations. The debugger front end
|
||
|
can either run remotely or run as an iSeries™ application.</li>
|
||
|
<li class="ulchildlink"><strong><a href="findleak.htm">Find memory leaks</a></strong><br />
|
||
|
If the performance of your program degrades as it runs for a longer
|
||
|
period of time, you may have erroneously coded a memory leak. You can use
|
||
|
the Java Watcher
|
||
|
to help you debug your program and locate memory leaks by performing Java application
|
||
|
heap analysis and object create profiling over time.</li>
|
||
|
</ul>
|
||
|
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="debugmain.htm" title="You have several options for debugging and troubleshooting Java programs that run on your server, including IBM iSeries System Debugger, the server interactive display, Java Debug Wire Protocol-enabled debuggers, and Java Watcher.">Debug Java programs that run on your server</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|