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 10:08:31 UTC 2016



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.

-Alan


More information about the serviceability-dev mailing list