Applying probes

Probekit uses a byte-code instrumentation (BCI) engine to apply your probes to class files, jar files, or entire directory trees of a Java project.

You run the BCI engine, ProbeInstrumenter, from the command line:
  1. Ensure that your CLASSPATH environment variable contains the full path and filename of the probekit.jar file. The probekit.jar file is in the org.eclipse.hyades.probekit subfolder of your Eclipse plugins folder.
  2. Ensure that your PATH environment variable contains the full path to a subfolder of org.eclipse.hyades.probekit that is appropriate for your platform:
    • os\win32\x86 for Windows
    • os/solaris/sparc for Solaris
    • os/linux/x86 for Linux
    Other platforms will have their own subdirectories.
  3. At the command prompt, enter the command: java ProbeInstrumenter, followed by the name of the .probescript file to use, and a list of items to instrument. The list items can be class files, jar files, or directories. For example:
    java ProbeInstrumenter myprobe.probescript c:\myproject_path\myprogram.jar
When the BCI engine instruments a class file, it renames it to *.class.bak and puts an instrumented copy in its place. When the engine instruments a jar file, it renames it to *.jar.bak, instruments all of the class files inside a copy of the jar file, and puts the instrumented copy in its place. When the engine instruments a folder, it descends into the directory tree recursively and processes the class files and jar files as described above.
Note: The BCI engine will not operate on class files and jar files that have already been instrumented by Probekit. You must remove existing probe instrumentation first.

Parent topic: Creating and using probes

Previous topic: Compiling probes
Next topic: Running a project with probes

Copyright IBM Corporation and others 2000, 2004.