Wiki source code of Using JRebel (previously called JavaRebel) with WOLips
Version 19.1 by Kieran Kelleher on 2011/07/25 20:04
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | JRebel is a tool from [[ZeroTurnaround>>http://www.zeroturnaround.com]]). | ||
2 | |||
3 | It is a java library that makes it possible to change java code while running a project in WOLips and see the results without having to restart. It is a great timesaver. | ||
4 | |||
5 | If you are running Eclipse 3.4, you should have a look at the screencast from David Avendasora at [[http://www.wocommunity.org/podcasts/WOJavaRebel_Setup.mov]]. | ||
6 | |||
7 | If you are running WOLips 3.5.1 or bigger, you are lucky: the JRebel plugin is included in the current WOLips for there versions. | ||
8 | |||
9 | === How to install and use JRebel === | ||
10 | |||
11 | * Get a free 30-day license, a open source developer license or a paid license from [[ZeroTurnaround>>http://www.zeroturnaround.com]] | ||
12 | * Put the license file (jrebel.lic) into a directory named .jrebel in your home directory. ( ,,/.jrebel/jrebel.lic ),, | ||
13 | * Get the JRebel plugin. Go to Eclipse->Preferences->Available Software Sites, add [[http://www.zeroturnaround.com/update-site/]] | ||
14 | |||
15 | [[image:AddZeroTurnAround.png]] | ||
16 | |||
17 | * Download the Jrebel Eclipse Integration and perhaps the JRebel Eclipse Debugger Integration from install new Software | ||
18 | |||
19 | [[image:InstallSoftware.png]] | ||
20 | |||
21 | * Make sure you have checked the JRebel Plugin in WOLips if you download the newest version. | ||
22 | |||
23 | [[image:UpdateWOLipsWithJRebel.png]] | ||
24 | |||
25 | * Restart Eclipse. You will now have a Jrebel preference item in your eclipse preferences | ||
26 | |||
27 | [[image:PathToJRebel.png]] | ||
28 | |||
29 | You have now installed and setup the stuff that WOLips needs to know about the location of JRebel.jar. | ||
30 | |||
31 | == How do you use it? == | ||
32 | |||
33 | Well that has become very simple since the inclusion of Quinton Dolan's JRebel plugin in WOLips. | ||
34 | |||
35 | For a project in which want to use jrebel to change java code while running, go to the run configuration of the project, under the contextual menu Run As->Run Configurations. | ||
36 | |||
37 | In the Run Configuration of a WOApplication you will notice an extra Tab, called JRebel. | ||
38 | |||
39 | Select the tab, and check the check boxes to enable JRebel Agent and (eventually) Enable debug logging. | ||
40 | |||
41 | [[image:EnableJRebel.png]] | ||
42 | |||
43 | Start you project from the Run Configuration. | ||
44 | |||
45 | Suddenly, you will get messages about jrebel being loaded, and some extra information about what settings are available as extra arguments. | ||
46 | |||
47 | {{info}} | ||
48 | |||
49 | If you get out of memory error with respect to "Perm Gen space", just allocate more Perm Gen memory in command line launch args in your launch configuration. For example: | ||
50 | |||
51 | \-XX:MaxPermSize=384m | ||
52 | |||
53 | {{/info}} | ||
54 | |||
55 | Start changing your java code on the fly: watch and start saving time. | ||
56 | |||
57 | [[image:JRebelWOLipsLog.png]] | ||
58 | |||
59 | * Profit (for the europeans: Extra Time Off) |