In my java program, I have a class with static block. I know that static blocks are initialized only once and loaded only once by JVM. But what if I want that static block to be executed(Or Loaded) more than one times . I have tried to dynamic load that class in another class using class.forName() and also tried using classLoader. But Static block is executing only once. So suggest me simplest way of doing it.
I came to know about the fact that by using classLoader we can load multiple version of same class. but how? Can I implement that concept in my program.