|
|
Requirements
What's required to get the project running
ObjectWeb's ASM
An open source project by an open source consortium.
Java 5 or higher
No reason why not upgrade to Java 5, really. Or 6, for that matter.
So, download it now from here.
Using the -javaagent flag
To make the magic work, you need to specifiy the yielder.jar in your classpath (using the -classpath flag) and specify the jar as an instrumentation agent using the -javaagent flag. So, your application should load like this (supposing you only have the yielder.jar to load:)
java -cp lib/yielder.jar -javaagent:lib/yielder.jar com.mycompany.MyApp
Sign in to add a comment

Hi, great stuff, thanks for doing it and sharing. I was trying to build an iterable Resultset, so using the yielder, my code looks like this:
and in another method (this is within a JUnit test), I have:
I have the javaagent setup in my surefire-test-plugin, like so:
Now when I run the test, I see that the log statements inside the iterable (before yieldReturn and yieldBreak are being shown), but I dont see any of the name= log messages in the calling loop. If I comment out the loop in testIteration and just make a single call to getNames(), then no log messages show up, which is as I expect. So I am doing something wrong on the yieldReturn call.
I am using yielder-0.2.2.jar (the latest on the Google code repository).
If you could point me to what I am doing wrong, I would really appreciate it.
Thanks very much, Sujit