My Java program loads classes dynamically at runtime. All classes are located in the same jar.
After deploying a new jar file, I sometimes get errors while the jar file is copying (NoClassDefFoundError etc.). This goes away the next time I run the program of course. Is there a way to preload classes so that my program is not affected when updating the jar?
I guess I could create instances of all classes and then clone() them, but perhaps there's a better way?