spring - Obtain Java class loading references hierarchy -


while debugging spring-driven aspectj ltw (using -verbose:class), have noticed 1 of classes advised being loaded class loader before spring establishes connection aspectj weaver.

considering java postpones loading of class until it's not possible delay more, there must reason why specific class being loaded soon.

is possible obtain "references stack" provokes loading of class jvm in specific moment (so can try postpone usage)? if so, how can it?

as noted, java (or vm, runs code) loads , resolves classes @ time, needed. leads knock-on effect several classes. there high chance, classes not contain woven code, loaded prior spring classes.

however, java hotspot vm (the typical vm, when oracle's java installed) can configured in many ways when being started. 1 of options "-xx:+traceclassloading" (note plus sign; above mentioned link unfortunately documents minus sign option). there option, traces loaded classes in reference order.

with that, should able narrow problem down. if not, example code might help. although fear, that bit large.


Comments