Installation of DCEVM using maven

DCEVM allows you to inject your compiled java code whilst the application is at the running state just like JRebel but freeware.

Project site: https://dcevm.github.io/

Download: https://github.com/dcevm/dcevm/releases/

Hotswap download: https://github.com/HotswapProjects/HotswapAgent/releases

 

for this experiement you’ll need DCEVM and hotswap agent. Download all tools and follow my lead

1. Launch DCEVM jar and patch your corresponding JVM(mind your jvm version is compatible with the DCEVM given version)

dcevm_1

2. Copy “hotswap-agent.jar” to a proper location, in the case to find it easily i located it in root C: drive

3.for maven projects go to environment variables and enter the below lines,

Variable Name: MAVEN_OPTS

Variable Value: -XXaltjvm=”dcevm” -javaagent:C:\hotswap-agent.jar

dcevm_2

4.check whether the variable is good to set in command line(if it does not print the value shown below, it is good to restart your machine windows may not pick it up quickly)

echo %MAVEN_OPTS%

dcevm_3

 

5.Launch your project, while your application is being kicked off, you’ll see outputs of howswap capturing the application

mvn clean tomcat7:run -Plocal-DskipTests

dcevm_4

dcevm_5

 

6. Implement a change while the application working, In the controller I’ve added a sysout to see the change rapidly

dcevm_6

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *