RFR: 8160950 Agent JAR added to app class loader rather than system class loader when running with -Djava.system.class.loader

Alan Bateman Alan.Bateman at oracle.com
Thu Sep 8 07:47:25 UTC 2016



On 08/09/2016 08:43, David Holmes wrote:
>
> I'd overlooked that the default system loader is used as the parent of 
> the custom system loader. But it will be very confusing if you refer 
> to the built-in loader as the "application" loader because the 
> "application" loader and the "system" loader have always been 
> synonymous: the loader that loads the application main class.
The issue of system vs. application class loader is a point of confusion 
that goes back 15+ years. Nothing in this patch changes this, all it is 
doing is aligning the implementation with how java agents were 
originally specified. For the few that do run with custom system class 
loader then it fixes the visibility issue that they have when they 
expect the agent code to have visibility to types that the custom system 
class loader will define.

-Alan


More information about the serviceability-dev mailing list