JRebel安装使用说明

JRebel安装使用说明

开发JAVA或对JAVA感兴趣的朋友,可以参考下。

开发环境下,tomcat对热布署的支持还是比较弱,致使开发过程中浪费大量时间在重起服务上。为了提高开发效率,决定引入Jrebel,它对热布署的支持相对比较全面。

虽然Jrebel官方号称使用它不存在内存泄漏问题,但是占用一定的资源是肯定的,因此不考虑在正式环境下使用热布署。Jrebel除了支持Tomcat还包括Jetty、Resin、Weblogic等等,本文要讲的是tomcat+ eclipse+ spring+ struts2的环境。在使用Jrebel后,期望看到开发人员早上开机启动一次tomcat后就够了。

PS. rebel出了免费社区版,参见:
http://zeroturnaround.com/blog/free-version-of-jrebel-social/

一、安装包准备

1. Jrebel.jar 核心JAR包,http://zeroturnaround.com/jrebel/prev-releases/ 上面进行下载。

2. update-site.zip jrebel Eclipse插件
http://www.zeroturnaround.com/update-site/update-site.zip

二、配置Eclipse

Eclipse中配置 window->preference->tomcat->JVM Settings,加入以下参数

-Drebel.spring_plugin=true 支持spring框架

-Drebel.aspectj_plugin=true 支持aspectj

-Drebel.struts2_plugin=true 支持strut2

-javaagent:D:\jrebel.jar 这里自行修改jrebel.jar正确的路径

-noverify

如果你要支持更多的框架,可以参考官网http://www.zeroturnaround.com/jrebel/features/frameworks/

如果你要了解更多的参数配置,可以参考官网

http://www.zeroturnaround.com/jrebel/configuration/

三、安装Eclipse插件

安装 JRebel Eclipse 插件

Help » Install New Software

然后通过 如下 URL :
http://www.zeroturnaround.com/update-site/
如果要离线下载的话,可以通过下载离线包的方式进行:
http://www.zeroturnaround.com/update-site/update-site.zip

JRebel安装使用说明

如果不使用默认的jrebel需指定其JAR包的路径 :

JRebel安装使用说明

四、配置 JReBel.xml

右键项目 点击属性就可以看到JRebel选项:

JRebel安装使用说明

选择配置文件的路径即可。

五、启动tomcat,成功安装

最后启动tomcat 就会看到控制台输出相关信息:

JRebel安装使用说明

  1. JRebel<span style="color:rgb(51,153,51)">-</span>Spring<span style="color:rgb(51,153,51)">:</span> Monitoring Spring bean definitions in <span style="color:rgb(0,0,255)">'jar:file:/E:/WorkSpace/JIUCOOL/WebContent/WEB-INF/lib/org.springframework.conf.jar!/spring/config/default/applicationContext.xml'</span>.  
  2. <span style="color:rgb(0,102,51)">JRebel</span><span style="color:rgb(51,153,51)">-</span>Spring<span style="color:rgb(51,153,51)">:</span> Monitoring Spring bean definitions in <span style="color:rgb(0,0,255)">'E:<span style="color:rgb(0,0,153)"><strong>\W</strong></span>orkSpace<span style="color:rgb(0,0,153)"><strong>\J</strong></span>IUCOOL<span style="color:rgb(0,0,153)"><strong>\W</strong></span>ebContent<span style="color:rgb(0,0,153)"><strong>\W</strong></span>EB-INF<span style="color:rgb(0,0,153)"><strong>\c</strong></span>onfig<span style="color:rgb(0,0,153)"><strong>\d</strong></span>ataContext.xml'</span>.  
  3. <span style="color:rgb(0,102,51)">JRebel</span><span style="color:rgb(51,153,51)">-</span>Spring<span style="color:rgb(51,153,51)">:</span> Monitoring Spring bean definitions in <span style="color:rgb(0,0,255)">'E:<span style="color:rgb(0,0,153)"><strong>\W</strong></span>orkSpace<span style="color:rgb(0,0,153)"><strong>\J</strong></span>IUCOOL<span style="color:rgb(0,0,153)"><strong>\W</strong></span>ebContent<span style="color:rgb(0,0,153)"><strong>\W</strong></span>EB-INF<span style="color:rgb(0,0,153)"><strong>\c</strong></span>onfig<span style="color:rgb(0,0,153)"><strong>\s</strong></span>erviceContext.xml'</span>.  
  4. <span style="color:rgb(0,102,51)">JRebel</span><span style="color:rgb(51,153,51)">-</span>Spring<span style="color:rgb(51,153,51)">:</span> Monitoring properties in <span style="color:rgb(0,0,255)">'E:<span style="color:rgb(0,0,153)"><strong>\W</strong></span>orkSpace<span style="color:rgb(0,0,153)"><strong>\J</strong></span>IUCOOL<span style="color:rgb(0,0,153)"><strong>\W</strong></span>ebContent<span style="color:rgb(0,0,153)"><strong>\W</strong></span>EB-INF<span style="color:rgb(0,0,153)"><strong>\c</strong></span>lasses<span style="color:rgb(0,0,153)"><strong>\c</strong></span>onfig.properties'</span>.  

说明JREBEL已经配置成功。










  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值