jvmhotswapjvmtidcevm

How to do HotSwapping without using IDE?


I've used DCEVM hotswap technology in eclipse and IntelliJ IDE which was pretty cool feature. By using DCEVM in IDE what I can do is, I can change into the source code i.e add/remove/edit method, classes, properties at the runtime without doing restart the program.

Now my question is: I want to apply the same features in my running application which is run without using any IDE. To be more specific the running applications source code(compiled code) can change on the fly. And for that bytecode how to deploy on DCEVM for runtime hotswapping?

What I've found is: We can do hotSwapping without using IDE for that we can write own JNI code to directly hook into JVMTI and trigger a hotswap.

any idea/help would be much helpfull. thanks


Solution

  • Fortunately I found the solution.We can use the HotSwapper plugin to solve this kind of problem. The same question is asked in dcevm discussion forume:

    https://groups.google.com/forum/#!topic/hotswapagent/Uk3cUdkHNYQ

    Although the information from this link https://news.ycombinator.com/item?id=3198497 is very helpfull but it was asked four years ago, so that I was stuck in.

    Now the DCEVM is being more smart It can support various plugin such as Hotswapper, AnonymousClassPatch, WatchResources, Hibernate, Spring, Jersey2, Jetty, Tomcat, ZK, Logback, JSF, Seam, ELResolver, OsgiEquinox and even we can write own plugin too which is more easy to develope.