JDK 17 with DCEVM and HotswapAgent

Jonas TM
Javarevisited
Published in
2 min readNov 14, 2021

--

The official DCVEM site (https://dcevm.github.io) has not yet released any info on an JDK 17 release and there is no JDK 17 build from Trava OpenJDK (as of writing this article).

As many developers are depended on DCEVM and HotswapAgent to develop in a sane way with frameworks like Spring I want to provide a short guide on how to create your own JDK 17 with DCEVM and HotswapAgent included.

1. Download JDK 17 with DCEVM included

The only releases with DCEVM included I could find are the ones provided by JetBrains. Go to the GitHub Repo and download the newest release including DCEVM: https://github.com/JetBrains/JetBrainsRuntime/releases

For Windows it is named something like this: jbr_dcevm-17_0_1-windows-x64-b164.4.tar.gz

After downloading unpack the JDK and put it into your preferred location.

2. Download HotswapAgent Jar

Go to the HotswapAgent GitHub Repo and download the newest release jar:
https://github.com/HotswapProjects/HotswapAgent/releases

Rename the jar to hotswap-agent.jar and put it in the JetBrains JDK Folder under lib/hotswap (create the folder if not existent already).

3. Start your program

In your IDE or environment configure to use the JetBrains JDK and start your program always with the following flag: -XX:HotswapAgent=fatjar

4. Have fun coding fast

Be sure to update the JDK and HotswapAgent from time to time as there are still some known bugs as of writing this article.

Also check https://dcevm.github.io from time to time if an official build including DCEVM and HotswapAgent is available.

--

--

Jonas TM
Javarevisited

Software Consultant mainly into Kotlin, Java, Go and some Cloud things.