Loading a class more than once using java’s built in ClassLoader is not possible because:
Builtin ClassLoader always checks if a class has already been loaded. If it is, it simply does nothing and returns.
Hence to reload a class, you have to use your custom ClassLoader.
Code to reload a class using custom ClassLoader is as follows: (more…)