Applying probes

The Probekit feature includes a byte-code instrumentation (BCI) engine, ProbeInstrumenter, that you can run from the command line to apply your probes to the class files, jar files, or directory trees of any Java project.

  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 subdirectory of your Eclipse plugins directory.
  2. Ensure that your PATH environment variable contains the full path to a subdirectory 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 commands: 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 directory, 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.

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

Related tasks
Creating and editing probes
Compiling probes
Running a project with probes
Modifying probes
Removing probe instrumentation
Using multiple probes simultaneously

Copyright IBM Corporation and others 2000, 2003.