114 lines
7.9 KiB
HTML
114 lines
7.9 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="task" />
|
||
|
<meta name="DC.Title" content="Initial debugging displays for Java programs" />
|
||
|
<meta name="abstract" content="As you debug your Java programs, follow these example displays for your programs. These displays show an example program, named Hellod." />
|
||
|
<meta name="description" content="As you debug your Java programs, follow these example displays for your programs. These displays show an example program, named Hellod." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="debugopt.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="initdeb" />
|
||
|
<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>Initial debugging displays for Java programs</title>
|
||
|
</head>
|
||
|
<body id="initdeb"><a name="initdeb"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Initial debugging displays for Java programs</h1>
|
||
|
<div><p>As you debug your Java™ programs, follow these example displays
|
||
|
for your programs. These displays show an example program, named Hellod.</p>
|
||
|
<div class="section"><ul><li>Enter <samp class="codeph">ADDENVVAR ENVVAR(CLASSPATH) VALUE ('/MYDIR')</samp>.</li>
|
||
|
<li>Enter this command: <samp class="codeph">RUNJVA CLASS(HELLOD) OPTION(*DEBUG)</samp>.
|
||
|
Insert the name of your Java program in place of HELLOD.</li>
|
||
|
<li>Wait for the Display Module Source display to appear. This is the source
|
||
|
for the HELLOD Java program. <pre>+--------------------------------------------------------------------------------+
|
||
|
| Display Module Source |
|
||
|
| |
|
||
|
| Class file name: HELLOD |
|
||
|
| 1 import java.lang.*; |
|
||
|
| 2 |
|
||
|
| 3 public class Hellod extends Object |
|
||
|
| 4 { |
|
||
|
| 5 int k; |
|
||
|
| 6 int l; |
|
||
|
| 7 int m; |
|
||
|
| 8 int n; |
|
||
|
| 9 int o; |
|
||
|
| 10 int p; |
|
||
|
| 11 String myString; |
|
||
|
| 12 Hellod myHellod; |
|
||
|
| 13 int myArray[]; |
|
||
|
| 14 |
|
||
|
| 15 public Hellod() |
|
||
|
| More... |
|
||
|
| Debug . . . |
|
||
|
| |
|
||
|
| F3=End program F6=Add/Clear breakpoint F10=Step F11=Display variable |
|
||
|
| F12=Resume F17=Watch variable F18=Work with watch F24=More keys |
|
||
|
| |
|
||
|
+--------------------------------------------------------------------------------+</pre>
|
||
|
</li>
|
||
|
<li>Press F14 (Work with Module List).</li>
|
||
|
<li>The Work with Module List display is shown. You can add other classes
|
||
|
and programs to debug by entering option 1 (Add program). Display their source
|
||
|
with option 5 (Display module source). <pre>+--------------------------------------------------------------------------------+
|
||
|
| Work with Module List |
|
||
|
| System: AS400 |
|
||
|
| Type options, press enter. |
|
||
|
| 1=Add program 4=Remove program 5=Display module source |
|
||
|
| 8=Work with module breakpoints |
|
||
|
| |
|
||
|
| Opt Program/module Library Type |
|
||
|
| *LIBL *SRVPGM |
|
||
|
| HELLOD *CLASS Selected |
|
||
|
| |
|
||
|
| |
|
||
|
| |
|
||
|
| |
|
||
|
| |
|
||
|
| |
|
||
|
| |
|
||
|
| |
|
||
|
| |
|
||
|
| Bottom |
|
||
|
| Command |
|
||
|
| ===> |
|
||
|
| F3=Exit F4=Prompt F5=Refresh F9=Retrieve F12=Cancel |
|
||
|
| F22=Display class file name |
|
||
|
| |
|
||
|
+--------------------------------------------------------------------------------+</pre>
|
||
|
</li>
|
||
|
<li>When adding a class to debug, you may need to enter a package-qualified
|
||
|
class name that is longer than the Program/module input field. To enter a
|
||
|
longer name, follow these steps: <ol><li>Enter Option 1 (Add program).</li>
|
||
|
<li>Leave the Program/module field blank.</li>
|
||
|
<li>Leave the library field as *LIBL.</li>
|
||
|
<li>Enter *CLASS for Type.</li>
|
||
|
<li>Press Enter.</li>
|
||
|
<li>A pop up window is displayed where you have more room to enter the package-qualified
|
||
|
class file name.</li>
|
||
|
</ol>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="debugopt.htm" title="Use the *DEBUG option to view the source code before running the program. The *DEBUG option allows you to set breakpoints within the code.">Debug Java programs by using the *DEBUG option</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|