Tags

links:
http://tutorials.jenkov.com/java-reflection/dynamic-class-loading-reloading.html

summary:
– keys are, 1) new cloader and 2) using interface
– a class uniquely identified by [cls, pkg, cloader]
– no dup within the same cloader
– problem: how to use a class reloaded dynamically?

sln:
– key is using interface (or superclass)
– code to use interface and cast the newly loaded class
– more problem: no two class can be loaded with the same [cls, pkg, cloader], so hence we need to use a different cloader as well (which is somewhat indirect but that’s how it is)

Advertisements