Setup for extension method weaving
Mike Duigou
mike.duigou at oracle.com
Mon Sep 19 12:17:22 PDT 2011
In order to run the unit tests provided for the lambda functional interfaces it's necessary to pre-link the extension methods aka "weaving" in the JRE rt.jar.
The current lambda workspace will weave rt.jar if the defender prototype weaver is located in a peer directory:
~/
code/
jdk8/
defender-prototype/ (http://hg.openjdk.java.net/lambda/defender-prototype/)
lambda/ (http://hg.openjdk.java.net/lambda/lambda)
I have had inconsistent results with the latest version of the prototype weaver. It seems to work for clean builds but fails for rebuilds. As a result I'm still using hg rev 28 (cdd54432fd05) which still works. [hg update -C -r 28]
If you are writing code which uses extension methods you will need to weave before running using current VMs. The weaver can weave either a directory or a jar to another jar or directory. It can't weave in-place.
$(BOOT_JAVA_CMD) -cp ../../../../defender-prototype/distrib/jsr335-agent.jar:../../../../defender-prototype/lib/asm-all-4.0.jar jsr335.agent.batch.Main -v -d rt.jar rt-preweave.jar
source (-d) is rt-preweave.jar
destination (parameter) is rt.jar
Mike
More information about the lambda-dev
mailing list