This is very important. The JHCR only watches for changes in the .class files. It is recommended to set the jhcr.projectDirectory argument so it points to the folder with your compiled classes only.
When changes take effect?
The JHCR uses a double approach:
-
Redefinition: Class redefinition is supported natively by Java, when there are no structural changes to the class. Redefinition is always attempted, if it succeds, all changes take effect for every created instance of the class.
-
Class override: When redefinition fails, the JHCR attempts to “override“ the original class. After an override, changes take effect only on newly created instances of that class.