By default, classes loaded in the HotSpot JVM can be updated only if the later runs in debug mode, and only for changes regarding method implementation. This means adding an attribute to an class requires a full restart.

DevTools is an improvement over that. It works by tweaking the standard classloading mechanism: one classloader is dedicated to libraries, another one to the project’s classes. If a class changes and if it cannot be reloaded by HotSpot, instead of restarting the whole JVM, the second classloader is simply discarded and all classes are loaded again. Since the number of classes in the project is very small compared to the number of classes in libraries and the JDK, this approach is very fast compared to a full restart. Plus, one benefits from keeping the session, the caches, etc.