Recompiling and rerunning Java code while it is running
1 answer
You can run multilpe instances of the same java program with different (command line) parameters without recompiling.
It is possible to run different versions of the same program and recompile at runtime, but if you modify the class file while the program is running, it can affect the current runtime if the file has not been loaded yet. You must create another working copy of the class files or jar files and then run the copy after modifying it if you want to run two different versions at the same time. If your program changes can be changed to properties file or other motives of config files, I think this is the best solution.
+3
source to share