第一步: 下载JavaRebel包
我们需要去下载JavaRebel的包, 我这里暂时不提供下载地址,因为我自己有软件洁癖,一定要官方的, 之前我是别人给我的, 还是希望大家去官方网站下载好.
第二步: 配置Eclipse的Overview
如果你这个页面不知道在哪儿的话, 请双击你们server下的Tomcat. 就会知道了.
将下载好的JavaRebel包,直接解压就好.进入Overview页面.如图所示:
第三步: 配置jrebel相关参数,如图所示
其中, 包含之前解压的包的位置, 还有struts, Spring相关的开关. 都写为true就可以了.
说明:
-Drebel.dirs 指定要监控的 编译后的java 文件目录,这个目录和上边javarebel.jar的路径千万不要有空格和中文,最好连.也不要有。
-Drebel.spring_plugin 表示对Spring的支持,默认是false
-Drebel.struts2-plugin=true,这里是-而不是_,千万不要自作聪明哟。
第四步:配置Modules,将auto reload 变成disabled
简单的配置就差不多完成了,启动tomcat,出现:
#############################################################
JRebel 4.0 (201105311152)
with Enterprise Add-On! (see http://jrebel.com/enterprise)
(c) Copyright ZeroTurnaround OU, Estonia, Tartu.
Over the last 1 days JRebel prevented
at least 1 redeploys/restarts saving you about 0 hours.
This product is licensed to www.imxylz.info
for unlimited number of developer seats on site.
The following plugins are disabled at the moment:
* Apache Click plugin (set -Drebel.click_plugin=true to enable)
Reloads menu.xml menu definitions of Apache Click projects.
* Glassfish METRO plugin (set -Drebel.metro_plugin=true to enable)
Supports METRO JAX-WS 2.2.3 implementation of the JAX-WS standard
* JBoss AOP Plugin (set -Drebel.jbossaop_plugin=true to enable)
Integration with jboss aop agent
* Jackson Plugin (set -Drebel.jackson_plugin=true to enable)
Supports reloading Jackson's JsonSerializer caches.
* Lift Plugin (set -Drebel.lift_plugin=true to enable)
Supports reloading singleton objects that extend RestHelper, MVCHelper,
LiftScreen or Wizard.
* RESTEasy Plugin (set -Drebel.resteasy_plugin=true to enable)
Supports adding/changing methods with @Path annotation for RESTEasy application.
* Seam Wicket Plugin (set -Drebel.seam_wicket_plugin=true to enable)
Integration with load time weaving seam annotations to wicket classes
(-javaagent:<path-to-jboss-seam-wicket-jar>)
* WebObjects Plugin (set -Drebel.webobjects_plugin=true to enable)
WebObjects JRebel Plugin
#############################################################
JRebel: A newer version '5.2.0' is available for download
JRebel: from http://www.zeroturnaround.com/jrebel/upgrade/
JRebel: Directory 'D:\server\wenda\trunk\WebContent\WEB-INF\classes' will be monitored for class changes.
说明配置成功了!