RFR: 8023492 jfr.jar gets loaded even though it's not used

Staffan Larsen staffan.larsen at oracle.com
Mon Sep 30 07:59:34 UTC 2013


When running a program that has code in the com.oracle.* package, jfr.jar will be loaded even if JFR is not referenced. This is because jre/lib/meta-index says that jfr.jar contains code for com.oracle.*. While this is true, it is a bit too general. It would be more accurate to say that jfr.jar contains code for com.oracle.jrockit.*.

Special cases such as this is handled in make/tools/src/build/tools/buildmetaindex/BuildMetaIndex.java. However, the logic started to look a bit complex with all the special handling, so I re-wrote it a little bit. The net result is that jre/lib/meta-index now says:

# jfr.jar
oracle/jrockit/
com/oracle/jrockit/
jdk/jfr/

instead of:

# jfr.jar
oracle/jrockit/
jdk/jfr/
com/oracle/

webrev: http://cr.openjdk.java.net/~sla/8023492/webrev.00/

Thanks,
/Staffan


More information about the build-dev mailing list