You load classes out of a jar explicitly by using, for example, a
java.net.UrlClassLoader. When you want to reload the classes, you make sure all the objects created using those classes are discarded, discard that UrlClassLoader, create a new one, and explcitly load the classes again.
Here's a trivial example which creates ten different versions of a class named "
Test", loads each one in place of the last one, and creates an instance of each one (example from
here):