Reload used classes at runtime Java
问题 I'm working on a program that watches a directory and runs all tests in the directory when it sees changes in the directory. This requires the program to dynamically load the classes, instead of getting the cached copies. I can dynamically load the test classes. Changes to the tests get detected and used at runtime. However, this isn't the case for the classes tested by the tests. My code for dynamically loading the classes and returning a list of test classes: List<Class<?>> classes = new