A JVM patched with DCE hotswap capabilities.
https://github.com/dcevm/dcevm/releases
Download latest release - this pertains to a specific JVM release.
Java SE Development Kit E.g. 8u172
Current versions from: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Archived versions from: http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html
Download latest from: https://github.com/HotswapProjects/HotswapAgent/releases
- Install JVM
- Run DCE installer as root:
sudo java -jar DCEVM-8u172-installer.jar
- Find the
jre
directory for the JVM installed in step 1./Library/Java/JavaVirtualMachines/jdk-1.8.0_172/Home/jre
- Install as alternate JVM
- Copy Hotswap agent jar to somewhere suitable E.g.
$HOME/lib/hotswap-agent/hotswap-agent-1.3.0.jar
- make a symlink for
$HOME/lib/hotswap-agent/hotswap-agent-current.jar
- Run applications using:
-XXaltjvm=dcevm -javaagent:${HOME}/lib/hotswap-agent/hotswap-agent-current.jar
- Copy
https://github.com/HotswapProjects/HotswapAgent/blob/master/hotswap-agent-core/src/main/resources/hotswap-agent.properties
tosrc/main/resources/hotswap-agent.properties
- Edit
hotswap-agent.properties
autoHotSwap=true
More
a. (spring-boot) use <jvmArguments>
in the spring-boot maven plugin config to add the above VM arguments
Run the following command line:
/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/bin/java \
-XXaltjvm=dcevm \
-javaagent:${HOME}/lib/hotswap-agent/hotswap-agent-current.jar \
-version
And you should see the following output, look specifically for the Dynamic Code Evolution
output.
HOTSWAP AGENT: 10:30:04.621 INFO (org.hotswap.agent.HotswapAgent) - Loading Hotswap agent {1.3.0} - unlimited runtime class redefinition.
HOTSWAP AGENT: 10:30:05.475 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [Hotswapper, JdkPlugin, AnonymousClassPatch, ClassInitPlugin, WatchResources, Hibernate, Hibernate3JPA, Hibernate3, Spring, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, Seam, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, Proxy, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Vaadin]
java version "1.8.0_172"
Java(TM) SE Runtime Environment (build 1.8.0_172-b11)
Dynamic Code Evolution 64-Bit Server VM (build 25.71-b01-dcevmlight-14, mixed mode)