Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > b8be6964f00c511f00fed788c030da8c > files > 12

jdiff-manual-1.0.10-2.0.5mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
<TITLE>JDiff - Running the Examples</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<center>
<H1>JDiff - Running the Examples</H1>
</center><br>

<BLOCKQUOTE>
These examples show two versions of a Java application called 
"SuperProduct", shipped by the <code>acme.com</code> company. The
source code for each version is in the directories 
<code>SuperProduct1.0</code> and <code>SuperProduct2.0</code>. The
results of JDiff comparing the two versions can be 
<a href="sample_output/newdocs/changes.html">seen here</a>.
</BLOCKQUOTE>

<BLOCKQUOTE>
There are five steps to complete the example, two of which are ordinary
<a href="http://java.sun.com/j2se/javadoc" target="_top">Javadoc</a>
commands, and three involve running JDiff, which is a Javadoc 
<a href="http://java.sun.com/j2se/1.4/docs/tooldocs/javadoc/overview.html">doclet</a>. 
The included <code>runme.bat</code> batch file, <code>runme csh</code>
script, and <code>build.xml</code> <a
href="http://jakarta.apache.org/ant">ANT</a> build file show each of these
steps in turn.
</BLOCKQUOTE>

<BLOCKQUOTE>
The five steps are as follows:
</BLOCKQUOTE>

<BLOCKQUOTE>
<ol>
<li>Generate Javadoc files for version 1.0.</li>

<li>Generate Javadoc files for version 2.0.</li>

<p>
<li><b>Use JDiff to generate an XML description of the API for version
1.0.</b><br><br>
<code>
javadoc -J-Xmx128m -doclet jdiff.JDiff -docletpath ..\..\lib\jdiff.jar<br>
&nbsp;&nbsp;-apiname "SuperProduct 1.0" -sourcepath ..\SuperProduct1.0 <version
1.0 package list>
</code>
<br><br>
The <code>-apiname</code> argument tells JDiff where to store the XML which
represents version 1.0 of the SuperProduct API. The <code>-sourcepath</code> argument
tells JDiff where to find the source code for the SuperProduct application.
</li>

<p>
<li><b>Use JDiff to generate an XML description of the API for version
2.0.</b><br>
This is the same as Step 3, with a different <code>-apiname</code>
argument and a different source code location for version 2.0 of SuperProduct.
</li>

<p>
<li><b>Compare the two APIs and generate the HTML report of the differences.</b><br><br>
<code>
javadoc -J-Xmx128m -doclet jdiff.JDiff -docletpath ..\..\lib\jdiff.jar
 -d newdocs<br>&nbsp;&nbsp;-oldapi "SuperProduct 1.0" -newapi "SuperProduct
 2.0"<br>&nbsp;&nbsp;-javadocold "../../olddocs/" -javadocnew
 "../../newdocs/" -sourcepath ..\..\lib Null
</code>
<br>
The optional <code>-d</code> argument indicates where the generated
HTML files should go.
The key arguments are <code>-oldapi</code> and <code>-newapi</code>,
which tell JDiff which APIs to compare. The names given to these
arguments must match the
names given to <code>-apiname</code> in steps 3 and 4. 
The <nobr><code>-javadocold</code></nobr> and
<nobr><code>-javadocnew</code></nobr> arguments are the locations of the
documentation generated by Javadoc in steps 1 and 2.
The Null class is only present because Javadoc needs a class to
scan. It is not used by JDiff in this step.
</li>

</ol>
</BLOCKQUOTE>
<br>

<BLOCKQUOTE>
Once these steps are complete, the report of the differences between
he two versions of SuperProduct is located
at <a href="sample_output/newdocs/changes.html">newdocs/changes.html</a> and in the 
<code>changes</code> subdirectory there. 
</BLOCKQUOTE>

<BLOCKQUOTE>
<b>SHIPPING NOTE</b>: JDiff-generated files comprise the <code>changes.html</code>
file, the <code>stylesheet-jdiff.css</code> file, the
<code>background.gif</code> file and the
<code>changes</code> subdirectory and its HTML files. No other files
need to be shipped for the results of JDiff to be used with a
product's documentation.
</BLOCKQUOTE>

<BLOCKQUOTE>
See also the <a href="../jdiff.html">reference page</a> for JDiff for a
complete description of each argument and more help.
</BLOCKQUOTE>

<p align="center">
<font size="-1">
Copyright &copy; 2001-2003 <a href="mailto:doar@pobox.com">Matthew B. Doar</a><br>
<a href="http://sourceforge.net/projects/javadiff/">JDiff Doclet</a>, v1.0.10
</font>
</p>

</BODY>
</HTML>