Changes for page Using DCEVM and Hotswap for rapid turnaround
Last modified by Markus Ruggiero on 2022/07/28 14:18
From version 10.1
edited by Samuel Pelletier
on 2015/07/07 17:42
on 2015/07/07 17:42
Change comment:
There is no comment for this version
To version 12.1
edited by Theodore Petrosky
on 2016/12/15 10:38
on 2016/12/15 10:38
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. Sam1 +XWiki.tedpet - Content
-
... ... @@ -7,28 +7,53 @@ 7 7 8 8 === (% style="line-height: 1.4285715;" %)Patching the VM(%%) === 9 9 10 -(% 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 45is at build 15 and it does notworkscompletely,I get exception because some DelegatingClassLoader are not updated.The version for Java 1.7 update 71 build 2 works fine with java 1.7.0_79.10 +(% 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. 11 11 12 -DCEVM download site: **[[http:~~/~~/dcevm.github.io>>url:http://dcevm.github.io||shape="rect"]] 12 +DCEVM download site: **[[http:~~/~~/dcevm.github.io>>url:http://dcevm.github.io||shape="rect"]]** 13 13 14 +**Launch the installer as root** 15 + 16 +** 17 +** 18 + 19 +{{{sudo java -jar DCEVM-light-8u92-installer.jar}}} 20 + 21 +(As of December 1, 2016 DCEVM-light-8u112-installer.jar is available) 22 + 23 +Click "Add installation directory..." and select your JRE Home. 24 + 25 +[[image:attach:DCEVM installer.png]] 26 + 27 +Click "Install DCEVM ad altvm" 28 + 29 +Quit the installer by closing the window. 30 + 14 14 === (% style="line-height: 1.4285715;" %)Downloading the Hotswap agent(%%) === 15 15 16 16 (% 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. 17 17 18 -(% style="line-height: 1.4285715;" %)Download the hot swap agent jar from my fork at[[https:~~/~~/github.com/spelletier/HotswapAgent/releases/tag/0.2_with_WO>>url:https://github.com/spelletier/HotswapAgent/releases/tag/0.2_with_WO||shape="rect"]] to an easy to type location, you will need the location to enable it.35 +(% 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. 19 19 20 -=== Howto useinaproject ===37 +=== Activate the tools === 21 21 22 -To enable HotSwap ,add thefollowing to the Run configurationofyourprojectn theVMargumentsection:39 +To enable HotSwap for all java launches, go to Installed JREs in Eclipse Preferences, select your active JRE and click Edit... 23 23 41 +[[image:attach:Eclipse Preferences.png]] 42 + 43 + 44 + 45 +Add the following text to the Default VM arguments: 46 + 24 24 -XXaltjvm=dcevm -javaagent:/replace_with_correct_path/hotswap-agent.jar 25 25 26 - === Known limitations===49 +[[image:attach:JRE settings.png]] 27 27 28 -* Change of superclass is not supported by DCEVM. 29 -* Modifying the return type of a method breaks. It seems there is some cache not cleared. 51 +Close the windows and now all your launches will have DCEVM and Hotswap enabled, 30 30 31 - (%style="line-height:1.4285715;"%)53 +If you prefer to enable per project basis, add the same arguments to the VM argument section of your project's Run configuration. 32 32 55 +=== Known limitations === 33 33 57 +* Change of superclass is not supported by DCEVM. 58 + 34 34 (% style="line-height: 1.4285715;" %)