The Hotswapagent is an alternative to JRebel, the tool for dynamic Java class reloading. Hotswapagent watches for project changes and reloads all modified resources like classes or images. Niagara classloader is a bit special. As a jar classloader, it expects to find all resources in the module jar files. When a module is requested, the module is loaded individually with its classloader. The classloader loads only the classes within the module's dependencies from the module.xml. To bypass this limitation, the Niagara Hotswapagent patches the Niagara classloader on startup. The patched classloader tries to load the classes from the defined location before it attempts to load the classes from the jar file. In runtime, the file watcher checks the location for changes and the Hotswapagent instantly reloads all changed classes without the need to restart the JVM.

Hotswap Agent for Niagara