After you have statically applied your probes to the class files
and JAR files for a project, run the project to collect data.
To collect data:
- If you applied your probes using from the workbench, run your
project exactly the way you would run it without probes. The action
of applying the probes copied all necessary files into their correct locations. As the program runs, the classes that you instrumented will run
with the probe logic specified in the probe definition.
- If you applied your probes from the command line, you need to set
up your target environment so that the class files instrumented by ProbeInstrumenter
can access the probe classes that were generated when you compiled the probe.
For example, in some cases you might have to make sure that the runtime
CLASSPATH environment variable for your project includes the folder that contains
the class files that were generated for the probe. To add the folder, on the
Classpath page of the Run or Debug window,
add the probe project to the class path.
Then run your project exactly
the way you would run it without probes. As the program runs, the classes
that you instrumented will run with the probe logic specified in the probe
definition.
Note: For some types of target programs (including Eclipse itself),
because of custom class loaders, the generated class files must be in a folder
that is in the boot class path instead of the class path.