Version 13.1 by Theodore Petrosky on 2018/11/09 19:34

Hide last authors
Samuel Pelletier 8.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.
Samuel Pelletier 4.1 2
3 = Prerequisites =
4
Samuel Pelletier 8.1 5 * A JRE patched with the DCEVM
Samuel Pelletier 4.1 6 * (% style="line-height: 1.4285715;" %)The Hotwsap agent to handle the WebObjects caches.
7
8 === (% style="line-height: 1.4285715;" %)Patching the VM(%%) ===
9
Theodore Petrosky 12.1 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.
Samuel Pelletier 4.1 11
Theodore Petrosky 12.1 12 DCEVM download site: **[[http:~~/~~/dcevm.github.io>>url:http://dcevm.github.io||shape="rect"]]**
Samuel Pelletier 4.1 13
Theodore Petrosky 12.1 14 **Launch the installer as root**
15
Theodore Petrosky 13.1 16 (% style="font-family: Arial , sans-serif;" %)sudo java -jar DCEVM-light-8u92-installer.jar
Theodore Petrosky 12.1 17
Theodore Petrosky 13.1 18 {{{}}}
Theodore Petrosky 12.1 19
Theodore Petrosky 13.1 20 (As of November 1, 2018 DCEVM-8u181-installer.jar is available)
Theodore Petrosky 12.1 21
22 Click "Add installation directory..." and select your JRE Home.
23
24 [[image:attach:DCEVM installer.png]]
25
26 Click "Install DCEVM ad altvm"
27
28 Quit the installer by closing the window.
29
Samuel Pelletier 8.1 30 === (% style="line-height: 1.4285715;" %)Downloading the Hotswap agent(%%) ===
Samuel Pelletier 4.1 31
Samuel Pelletier 8.1 32 (% 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.
Samuel Pelletier 4.1 33
Theodore Petrosky 12.1 34 (% 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.
Samuel Pelletier 4.1 35
Theodore Petrosky 12.1 36 === Activate the tools ===
Samuel Pelletier 4.1 37
Theodore Petrosky 12.1 38 To enable HotSwap for all java launches, go to Installed JREs in Eclipse Preferences, select your active JRE and click Edit...
Samuel Pelletier 4.1 39
Theodore Petrosky 12.1 40 [[image:attach:Eclipse Preferences.png]]
41
42
43
44 Add the following text to the Default VM arguments:
45
Samuel Pelletier 8.1 46 -XXaltjvm=dcevm -javaagent:/replace_with_correct_path/hotswap-agent.jar
Samuel Pelletier 4.1 47
Theodore Petrosky 12.1 48 [[image:attach:JRE settings.png]]
49
50 Close the windows and now all your launches will have DCEVM and Hotswap enabled,
51
52 If you prefer to enable per project basis, add the same arguments to the VM argument section of your project's Run configuration.
53
Samuel Pelletier 8.1 54 === Known limitations ===
Samuel Pelletier 4.1 55
Samuel Pelletier 8.1 56 * Change of superclass is not supported by DCEVM.
57
Samuel Pelletier 4.1 58 (% style="line-height: 1.4285715;" %)