To monitor Java applets, class files, JAR files. or code launched by container programs, from the command line, type:
For an applet:
coverage [<PureCoverage options>] /java [/jit] <applet viewer> {<applet viewer options>} <applet>
For a class file:
coverage [<PureCoverage options>] /java [/jit] <Java viewer> [<Java viewer options>] <class>
For a JAR file:
coverage [<PureCoverage options>] /java <Java viewer> [<Java viewer options>]<JAR switch> <JAR file>.jar <class>
For a container program:
coverage [<PureCoverage options>] /java [/jit] <exename> [<arguments to <exename>]
For example, to monitor a local applet using the Sun JVM and save the coverage data, you can type:
coverage /SaveData=index.cfy /java appletviewer file:///"C:\Program Files\MyJavaProjects\index.html""
PureCoverage launches the applet Index.htm, and saves the collected coverage data to the PureCoverage data file (.cfy) Index.cfy without displaying any data coverage windows.
To monitor a Web applet, you can type:
coverage /java <path to IE>\iexplore.exe -new http://www.myDomain.com/javaDev/myProjects/myApp/index.html
PureCoverage runs Internet Explorer, with the specified argument -new, then launches the applet index.htm and displays the Run Summary window as it collects coverage data for the applet.
Notes:
§ For information about configuring your Java Runtime Environment for PurifyPlus, click .
§ PureCoverage requires debug data to monitor methods at the line leve l or the function level. For instructions for compiling Java code with debug data, refer to the documentation for your JVM.
§ To run programs from the command line, you must have the RationalPurifyPlus/common directory in your PATH environment variable.
§ When monitoring Java applets launched by Internet Explorer 4.0 with the Active Desktop installed, you must pass the -new argument to Internet Explorer. Otherwise, coverage data is not collected for your applet. To check whether the Active Desktop is installed, right-click your desktop and select Properties from the shortcut menu. If the Active Desktop component is installed, the Properties dialog box has a Web tab.
(C) Copyright IBM Corporation 1993, 2010.