Changes for page Using DCEVM and Hotswap for rapid turnaround
Last modified by Samuel Pelletier on 2025/12/03 16:46
From version 19.3
edited by Samuel Pelletier
on 2025/12/03 16:46
on 2025/12/03 16:46
Change comment:
There is no comment for this version
To version 14.1
edited by D Tim Cummings
on 2021/11/11 22:49
on 2021/11/11 22:49
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 7 removed)
Details
- Page properties
-
- Parent
-
... ... @@ -1,1 +1,0 @@ 1 -WOL.Home.WOLips.WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Sam1 +XWiki.timcu - Content
-
... ... @@ -1,99 +1,91 @@ 1 1 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. 2 2 3 -= DCEVM and Hotswap Agent for Java 17 +=3 += DCEVM and Hotswap Agent for Java 17 = 4 4 5 5 === JRE patched with the DCEVM === 6 6 7 -The Jetbrains JDK releases are unofficial but they provide JREs patched with the DCEVM. They are available here (select a"with JCEF"version)7 +The Jetbrains JDK releases are unofficial but they provide JREs patched with the DCEVM. They are available at [[https:~~/~~/github.com/JetBrains/JetBrainsRuntime/releases>>url:https://github.com/JetBrains/JetBrainsRuntime/releases||shape="rect"]] . These instructions were tested with Release 17_0_1-b164.4, architecture osx-x64, JBR with JCEF (DCEVM) , [[jbr>>url:https://cache-redirector.jetbrains.com/intellij-jbr/jbr_dcevm-17_0_1-osx-x64-b164.4.tar.gz||shape="rect"]] and [[jbrsdk>>url:https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_dcevm-17_0_1-osx-x64-b164.4.tar.gz||shape="rect"]]. They should also work with architecture osx-aarch64. 8 8 9 -[[https:~~/~~/github.com/JetBrains/JetBrainsRuntime>>https://github.com/JetBrains/JetBrainsRuntime]] 10 10 11 - I recommend installer (.pkg) versions for easy installation.10 +\\ 12 12 13 - Ifyou preferthemanual way, download archivedversion (.tar.gz)andmoveit'scontentsinthesystemJRE directory/Library/Java/JavaVirtualMachines/12 +{{{curl -OL curl -O https://cache-redirector.jetbrains.com/intellij-jbr/jbrsdk_dcevm-17_0_1-osx-x64-b164.4.tar.gztar -zxf jbrsdk_dcevm-17_0_1-osx-x64-b164.4.tar.gzsudo mv jbrsdk /Library/Java/JavaVirtualMachines/jbrsdk_dcevm-17_0_1-osx-x64-b164.4}}} 14 14 15 15 === Hotswap Agent === 16 16 17 - DownloadandinstallHotswapagent fromthe official site[[https:~~/~~/github.com/HotswapProjects/HotswapAgent>>https://github.com/HotswapProjects/HotswapAgent]]16 +Copy the latest version of Hotswap Agent from [[https:~~/~~/github.com/HotswapProjects/HotswapAgent/releases>>url:https://github.com/HotswapProjects/HotswapAgent/releases||shape="rect"]] 18 18 19 -The easiest way is to add it directly into the JRE in the Home/lib/hotswap directory. 20 20 21 - Here are the detailed steps with an installed JDK in /Library/Java/JavaVirtualMachines/jbr_jcef-21.0.8-osx-aarch64-b1163.69/ and the latest hotswap release at [[https:~~/~~/github.com/HotswapProjects/HotswapAgent/releases/download/RELEASE-2.0.1/hotswap-agent-2.0.1.jar>>https://github.com/HotswapProjects/HotswapAgent/releases/download/RELEASE-2.0.1/hotswap-agent-2.0.1.jar]]19 +\\ 22 22 23 -{{{sudo mkdir /Library/Java/JavaVirtualMachines/jbr_jcef-21.0.8-osx-aarch64-b1163.69/Contents/Home/lib/hotswap 24 -sudo curl -Lo "/Library/Java/JavaVirtualMachines/jbr_jcef-21.0.8-osx-aarch64-b1163.69/Contents/Home/lib/hotswap/hotswap-agent.jar" ""}}} 21 +{{{curl -OL https://github.com/HotswapProjects/HotswapAgent/releases/download/1.4.2-SNAPSHOT/hotswap-agent-1.4.2-SNAPSHOT.jarsudo mkdir /Library/Java/JavaVirtualMachines/jbrsdk_dcevm-17_0_1-osx-x64-b164.4/Contents/Home/lib/hotswapsudo 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}}} 25 25 26 - Afterinstallingyour preferred releases (select a "with JCEF" version)you need to add it to yourEclipseworkspace and select it as default. You need to add these Default VM Arguments to enable HotSwap "-XX:+AllowEnhancedClassRedefinition-XX:HotswapAgent=fatjar"23 +=== Install in Eclipse 2021-09 === 27 27 28 - ===Installin Eclipse 2025-09===25 +In "Help > Eclipse Marketplace" install "Java 17 Support for Eclipse 2021-09 (4.21)" (Don't need patch sources). This should not be needed for Eclipse 2021-12. 29 29 30 -In "Eclipse > Settings > Java > Installed JREs" click [Add...] (next) [MacOS X VM] (next)27 +In "Eclipse > Preferences > Java > Installed JREs" click [Add...] (next) [MacOS X VM] (next) 31 31 32 - JRE Home: /Library/Java/JavaVirtualMachines/jbr_ jcef-21.0.8-osx-aarch64-b1163.69/Contents/Home29 + JRE Home: /Library/Java/JavaVirtualMachines/jbrsdk_dcevm-17_0_1-osx-x64-b164.4/Contents/Home 33 33 34 - JRE name: j br_jcef-21.0.8-osx-aarch64-b1163.69 //oranythingyou prefer//31 + JRE name: jetbrains dcevm 17 35 35 36 - Default VM arguments: "-XX:+AllowEnhancedClassRedefinition -XX:HotswapAgent=fatjar"33 + Default VM arguments: -XX:HotswapAgent=fatjar ~-~-add-exports=java.base/sun.security.action=ALL-UNNAMED 37 37 38 38 [Finish] 39 39 40 - The "~-~-add-exports" is not required for hotswap but is required to run WebObjects applications in Java 17.37 +\\ 41 41 42 - === Troubleshooting ===39 +{{{}}} 43 43 44 -a. Some versions of macOS may prevent this java from running because of security quarantining. Try removing quarantine from java folder. 45 - 46 -{{{sudo xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/jbrsdk_jcef-17.0.3-x64-b469}}} 47 - 48 -b. In the "Project" menu, "Build Automatically" should be selected for hot swap to work. 49 - 50 50 = DCEVM and Hotswap Agent for Java 8 = 51 51 52 52 === Prerequisites === 53 53 54 54 * A JRE patched with the DCEVM 55 -* The Hotwsap agent to handle the WebObjects caches. 46 +* (% style="line-height: 1.4285715;" %)The Hotwsap agent to handle the WebObjects caches. 56 56 57 -=== Patching the VM === 48 +=== (% style="line-height: 1.4285715;" %)Patching the VM(%%) === 58 58 59 -DCEVM is the patch that enable the enhanced class redefinition in the VM. Download the installer for your JRE version and install the alternative VM. The patch is not always available for the latest update of the JRE, you may try the latest update available but it may not works. At the time I write this, the patch for Java 1.8 update 92 works as expected. 50 +(% style="line-height: 1.4285715;" %)DCEVM is the patch that enable the enhanced class redefinition in the VM. Download the installer for your JRE version and install the alternative VM. The patch is not always available for the latest update of the JRE, you may try the latest update available but it may not works. At the time I write this, the patch for Java 1.8 update 92 works as expected. 60 60 61 -DCEVM download site: **[[http:~~/~~/dcevm.github.io>>url:http://dcevm.github.io]]** 52 +DCEVM download site: **[[http:~~/~~/dcevm.github.io>>url:http://dcevm.github.io||shape="rect"]]** 62 62 63 63 **Launch the installer as root** 64 64 65 -sudo java -jar DCEVM-light-8u92-installer.jar 56 +(% style="font-family: Arial , sans-serif;" %)sudo java -jar DCEVM-light-8u92-installer.jar 66 66 67 -{{{ 68 - }}} 58 +{{{}}} 69 69 70 70 (As of November 1, 2018 DCEVM-8u181-installer.jar is available) 71 71 72 72 Click "Add installation directory..." and select your JRE Home. 73 73 74 -[[image: DCEVM%20installer.png||alt="DCEVM installer.png"]]64 +[[image:attach:DCEVM installer.png]] 75 75 76 76 Click "Install DCEVM ad altvm" 77 77 78 78 Quit the installer by closing the window. 79 79 80 -=== Downloading the Hotswap agent === 70 +=== (% style="line-height: 1.4285715;" %)Downloading the Hotswap agent(%%) === 81 81 82 -Hotwsap agent allows plugins to react to class redefinition events. These plugins are similar to the the JRebel plugins and add frameworks specific code to make sure they handle correctly to the class changes. 72 +(% style="line-height: 1.4285715;" %)Hotwsap agent allows plugins to react to class redefinition events. These plugins are similar to the the JRebel plugins and add frameworks specific code to make sure they handle correctly to the class changes. 83 83 84 -Download the hot swap agent jar from [[https:~~/~~/github.com/HotswapProjects/HotswapAgent/releases>>url:https://github.com/HotswapProjects/HotswapAgent/releases]] to an easy to type location, you will need the location to enable it. 74 +(% style="line-height: 1.4285715;" %)Download the hot swap agent jar from [[https:~~/~~/github.com/HotswapProjects/HotswapAgent/releases>>url:https://github.com/HotswapProjects/HotswapAgent/releases||shape="rect"]] to an easy to type location, you will need the location to enable it. 85 85 86 86 === Activate the tools === 87 87 88 88 To enable HotSwap for all java launches, go to Installed JREs in Eclipse Preferences, select your active JRE and click Edit... 89 89 90 -[[image: Eclipse%20Preferences.png||alt="Eclipse Preferences.png"]]80 +[[image:attach:Eclipse Preferences.png]] 91 91 82 +\\ 83 + 92 92 Add the following text to the Default VM arguments: 93 93 94 94 -XXaltjvm=dcevm -javaagent:/replace_with_correct_path/hotswap-agent.jar 95 95 96 -[[image: JRE%20settings.png||alt="JRE settings.png"]]88 +[[image:attach:JRE settings.png]] 97 97 98 98 Close the windows and now all your launches will have DCEVM and Hotswap enabled, 99 99 ... ... @@ -103,4 +103,4 @@ 103 103 104 104 * Change of superclass is not supported by DCEVM. 105 105 106 - 98 +(% style="line-height: 1.4285715;" %)
- DCEVM installer.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -399.3 KB - Content
- DCEVM%20installer.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Sam - Size
-
... ... @@ -1,1 +1,0 @@ 1 -399.3 KB - Content
- Eclipse Preferences.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -163.2 KB - Content
- Eclipse%20Preferences.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Sam - Size
-
... ... @@ -1,1 +1,0 @@ 1 -163.2 KB - Content
- JRE settings.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -393.2 KB - Content
- JRE%20settings.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.Sam - Size
-
... ... @@ -1,1 +1,0 @@ 1 -393.2 KB - Content
- Screen Shot 2021-11-12 at 07.44.51.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.XWikiGuest - Size
-
... ... @@ -1,1 +1,0 @@ 1 -196.2 KB - Content