How to do HotSwapping without using an IDE?

I used hotswap DCEVM technology in eclipse and IntelliJ IDE which was pretty cool. Using DCEVM in the IDE, I can modify the source code. Add / remove / edit method, classes, properties at runtime without restarting the program.

Now my question is: I want to apply the same functionality in my running application, which is executed without using any IDE. To be more specific, the source code of executable applications (compiled code) can be changed on the fly. And for this bytecode, how to deploy on DCEVM for hot swap runtime?

What I found: We can do hotSwapping without using an IDE so that we can write our own JNI code to directly connect to the JVMTI and run hotswap.

any idea / help would be very helpful. thank

+3


source to share


1 answer


Luckily I found a solution. We can use the HotSwapper plugin to fix this problem. The same question is asked in the dcevm discussion:

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



While the information from this link https://news.ycombinator.com/item?id=3198497 is very helpful, it was requested four years ago, so that's why I'm stuck.

Now DCEVM is smarter. It can support various plugins like Hotswapper, AnonymousClassPatch, WatchResources, Hibernate, Spring, Jersey2, Jetty, Tomcat, ZK, Logback, JSF, Seam, ELResolver, OsgiEquinox, and even we can write our own plugin which is easier to develop.

+1


source







All Articles