0N/A<HTML>
0N/A<HEAD>
0N/A <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
0N/A <TITLE>trace example</TITLE>
0N/A</HEAD>
0N/A<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000FF" VLINK="#000077" ALINK="#FF0000">
0N/A<H2>trace example</H2>
0N/A
0N/A<B>Trace</B> runs the Java language program passed as an argument and
0N/Agenerates a trace of its execution. <B>Trace</B> is a simple command
0N/Aline tool that uses the
0N/A<A HREF="http://java.sun.com/j2se/1.4/docs/guide/jpda/architecture.html#jdi">
0N/AJava Debug Interface (JDI)</A>. Programs need
0N/Anot be compiled for debugging since this information is not
0N/Aused.
0N/A<P>
0N/A<B>Trace</B> can be invoked as follows:
0N/A<PRE>
0N/A java com.sun.tools.example.trace.Trace <i>options class args</i>
0N/A</PRE>
0N/AYour classpath must include the JDI Library
0N/A(see <A HREF="index.html#SETUP">set-up</A>),
0N/Athe path to the compiled <b>trace</b> class files,
0N/Aand the path for the application being traced.
0N/A<P>
0N/AAvailable <i>options</i> are:
0N/A
0N/A<PRE>
0N/A -output <i>filename</i>
0N/A Set destination for output trace. By default output
0N/A goes to the terminal.
0N/A
0N/A -all
0N/A Include system classes in output. By default
0N/A java.*, javax.*, sun.* and com.sun.* events are
0N/A not diplayed.
0N/A
0N/A -fields
0N/A Also show assignments into fields.
0N/A
0N/A -help
0N/A Print a help message
0N/A
0N/A</PRE>
0N/A<i>class</i> is the program to trace. <i>args</i> are the arguments to <i>class</i>.
0N/A<P>
0N/A
0N/A<H2>Source for trace</H2>
0N/AFull source code for <b>trace</b> is included in the
0N/A<code>trace</code> directory of <code>examples.jar</code>.
0N/ASource code for these example applications is included to provide concrete
0N/Aexamples for debugger developers. Example code may be used, modified
0N/Aand redistributed by debugger developers providing they adhere to the
0N/Aterms in the COPYRIGHT notice.
0N/A
0N/A<P>
0N/A<H2>Building trace</H2>
0N/ATo completely rebuild the <b>trace</b> classes from the
0N/Aprovided source files in the <code>trace</code> directory,
0N/Ayou need only to compile them. No special
0N/Aoptions are required, aside from those which set your classpath to
0N/Ainclude the <A HREF="index.html#SETUP">JDI Library</A>.
0N/A
0N/A<P>
0N/A <hr>
0N/A <address><a href="mailto:java-debugger@java.sun.com">java-debugger@java.sun.com</a></address>
0N/A </P>
0N/A<P>
0N/A</P>
0N/A</BODY>
0N/A</HTML>