Smoke Test

  • Download this jar file
  • Start a command prompt and change to the directory where you downloaded Registrar.jar
  • At a command prompt, type the following command (making sure you are using a Java 5 VM or later)
java -javaagent:Registrar.jar -Dschuchert.ClassFileTransformer=schuchert.agent.NullClassFileTransformer schuchert.agent.Main
  • Verify that you see only the following output:
Congratulations, everything seems to be working

If you see anything else, check here

Contents of Jar

The Registrar.jar file contains several things, including source and class files and even a JUnit 4 test. IF you want to actually run that test, you'll need to have the following in your class path:
  • JUnit 4.4 (not shipped with Eclipse 3.3 or before)
  • JMOck 2.4
Or better yet, you can just download this Eclipse 3.3 workspace and run the tests within eclipse:
  1. Download this file
  2. Extract the file to some directory, e.g. PC: c:\workspaces or Mac: /Users/schuchert/workspaces
    • This creates a directory called JavaAgent under the target directory
  3. Start Eclipse
  4. Select the JavaAgent directory when Eclipse asks for a workspace, e.g. PC: c:\workspaces\JavaAgent or Mac: /Users/schuchert/workspaces/JavaAgent
  5. You might get a few errors regarding not being able to open some perspectives, (e.g. if you do not have the subclipse perspective installed). You can safely ignore these errors.
  6. Select the project JavaAgentRegistrar
  7. Right-click:Run As:Junit Test

If you want to verify that you can also run a Java Application, do the following:
  1. Expand the JavaAgentRegistrar project
  2. Open the package schuchert.agent
  3. Select
  4. Right-click:Run As:Java Application
  5. You will probably get an error in the console because you need to set execution properties for Main:
    1. Right-click on
    2. Select:Run As:Open Run Dialog...
    3. Click on the (x) = Arguments tab
    4. Under VM arguments: enter the following: -javaagent:Registrar.jar -Dschuchert.ClassFileTransformer=schuchert.agent.NullClassFileTransformer
    5. Click Run

Recreate Registrar.jar
  1. Open the JavaAgentRegistrar project
  2. Select RecreateJar.jardesc
  3. Right-click and select **Create JAR*
This will create a new jar and replace the one that is currently in that project.