Running
As mentioned previously, the -javaagent switch that was added to Java 1.5 is used to dynamically insert contract verification to your classes.
Running a C4J enabled application from the command line looks as below, provided that your classpath contains the javassist.jar jar and your test classes
(don't forget to enable assertions using the -ea switch):
java -javaagent:../dist/c4j.jar -ea simple.Test
Arguments are passed to the -javaagent switch as a comma separated string after the agent jar. There are a couple of command line switches that C4J honors
(followed by an example):
verbose=<true|false> - will print a little more information on classes that fails to load.
classfiledir=<dir> - makes the instrumented classes to be written to the specified directory.
-javaagent:../dist/c4j.jar=classfiledir=d:/dev/,verbose=true