DCEVM and Hotswap enable rapid turnaround by allowing almost any class change to the running VM. It offers an experience very similar to JRebel for WebObjects developers. With this tool, you usually do not have to restart your application after code change.
The Jetbrains JDK releases are unofficial but they provide JREs patched with the DCEVM. They are available at https://github.com/JetBrains/JetBrainsRuntime/releases . These instructions were tested with Release 17_0_1-b164.4, architecture osx-x64, JBR with JCEF (DCEVM) , jbr and jbrsdk. They should also work with architecture osx-aarch64.
curl -OL https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_dcevm-17_0_1-osx-x64-b164.4.tar.gz
tar -zxf jbrsdk_dcevm-17_0_1-osx-x64-b164.4.tar.gz
sudo mv jbrsdk /Library/Java/JavaVirtualMachines/jbrsdk_dcevm-17_0_1-osx-x64-b164.4
Copy the latest version of Hotswap Agent from https://github.com/HotswapProjects/HotswapAgent/releases
curl -OL https://github.com/HotswapProjects/HotswapAgent/releases/download/1.4.2-SNAPSHOT/hotswap-agent-1.4.2-SNAPSHOT.jar
sudo mkdir /Library/Java/JavaVirtualMachines/jbrsdk_dcevm-17_0_1-osx-x64-b164.4/Contents/Home/lib/hotswap
sudo mv hotswap-agent-1.4.2-SNAPSHOT.jar /Library/Java/JavaVirtualMachines/jbrsdk_dcevm-17_0_1-osx-x64-b164.4/Contents/Home/lib/hotswap/hotswap-agent.jar
In "Help > Eclipse Marketplace" install "Java 17 Support for Eclipse 2021-09 (4.21)" (accept default packages). This should not be needed for Eclipse 2021-12.
In "Eclipse > Preferences > Java > Installed JREs" click [Add...] (next) [MacOS X VM] (next)
JRE Home: /Library/Java/JavaVirtualMachines/jbrsdk_dcevm-17_0_1-osx-x64-b164.4/Contents/Home
JRE name: jetbrains dcevm 17
Default VM arguments: -XX:HotswapAgent=fatjar --add-exports=java.base/sun.security.action=ALL-UNNAMED
The "--add-exports" is not required for hotswap but is required to run WebObjects applications in Java 17.
a. Some versions of macOS may prevent this java from running because of security quarantining. Try removing quarantine from java folder.
sudo xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/jbrsdk_dcevm-17_0_1-osx-x64-b164.4
b. In the "Project" menu, "Build Automatically" should be selected for hot swap to work.
Launch the installer as root
sudo java -jar DCEVM-light-8u92-installer.jar
(As of November 1, 2018 DCEVM-8u181-installer.jar is available)
Click "Add installation directory..." and select your JRE Home.
To enable HotSwap for all java launches, go to Installed JREs in Eclipse Preferences, select your active JRE and click Edit...
Add the following text to the Default VM arguments: