I have a jvm that runs inside a cpp program using JNI and receives a CLASSPATH parameter. I saw that when I add jars to the CLASSPATH the, heap size and usage is larger even when the classes in these jars are not loaded or called in any way.
Can someone explain why this happens? is it some memory optimization the JVM trying to do?
Can I change this behavior?