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

David Holmes david.holmes at oracle.com
Thu Sep 8 10:20:51 UTC 2016



On 8/09/2016 8:08 PM, Alan Bateman wrote:
>
>
> On 08/09/2016 11:06, David Holmes wrote:
>>
>> Okay so ... that means this:
>>
>> JvmtiEnv::AddToSystemClassLoaderSearch(const char* segment) {
>>   jvmtiPhase phase = get_phase();
>>
>>   if (phase == JVMTI_PHASE_ONLOAD) {
>>     for (SystemProperty* p = Arguments::system_properties(); p !=
>> NULL; p = p->next()) {
>>       if (strcmp("java.class.path", p->key()) == 0) {
>>         p->append_value(segment);
>>         break;
>>       }
>>     }
>>     return JVMTI_ERROR_NONE;
>>
>> is now dead code as we never call this in the ONLOAD phase?
>>
> It's not dead as there may be JVM TI agents that use it to extend it
> during the onload phase. There needs to be another follow-up issue to
> clarify the JVM TI spec but that is a separate issue.

Ok. Not sure who can call it from where but follow up issue is fine.

Thanks,
David

>
> -Alan


More information about the serviceability-dev mailing list