Agent7 aims to be simple, for use by standalone JVM programs to reload .class files in development mode. It only reloads .class files in classpath when they are changed.
"7" in "Agent7" is because Agent7 uses file watch API available in Java 7+. You need to use Java 7+.
Download agent7.jar.
java -javaagent:path/to/agent7.jar [other options] <YourMainClass>
Whenever a .class file in the current working directory (or its subdirectories) changes, Agent7 will reload the corresponding class in all class loaders.
Agent7 can run with normal Java. But it is intended for use together with DCEVM.
The Dynamic Code Evolution Virtual Machine (DCE VM) is a modification of the Java HotSpot(TM) VM that allows unlimited redefinition of loaded classes at runtime. The current hotswapping mechanism of the HotSpot(TM) VM allows only changing method bodies. Our enhanced VM allows adding and removing fields and methods as well as changes to the super types of a class.
Although DCEVM supports advanced class changes, it itself doesn't reload classes. You need a javaagent like Agent7 (IDEs like Eclipse and InteliJ act as javaagent, they can reload classes).
You can install DCEVM in 2 ways:
See DCEVM - A JRebel free alternative for more info.
If you have more complex programs, you can use:
Also see AgentSmith.