KB Article #63972
how to make a class used by different JMCs with the same procengine is loaded only one time?
Problem
how to make a class used by different JMCs with the same procengine is loaded only one time?
Resolution
When the JMC is created a dedicated ClassLoader is created for it. So when each JMC try to access the same class for the first time, it doesn't find it and instantiate it. This is why by default there is one instantiation per JMC.
The goal is to manage jar dependencies as different JMCs can use different versions of same jars.
Nonetheless it is possible to instantiate a class only once. For this the class should be placed in a jar located in $CORE_ROOT/java/lib/ext so that it will be loaded once only, per the parent ClassLoader of the JMC ClassLoaders