javaRebel(jRebel)简介

 做过Java WEB开发的都知道在对类文件的方法名进行修改时,要重新重启Web服务器类的修改才生效。而在开发中要等Web服务器重启也要一定的时间,利用javaRebel(jRebel)可以做到修改类文件后即时加载(其实更准确的说应该是当应用访问到该类时才加载),不用再去重新启动Web服务器,提高了开发效率。

javaRebel(jRebel)的安装配置:

javaRebel(jRebel)有两种安装方式,一种是eclipse的插件方式,另一种是直接设置tomcat的jvm参数的方式。

第二种方法的安装比较简单,现以第二种来安装配置。具体的方法就是(此处以tomcat6为例):window-preferences-servers-tomcat-tomcat 6.x-jdk-Optional java vm arguments这个框里面输入java vm的参数,具体设置如下:

 

Java代码

  1. -noverify    
  2. -javaagent:F:/jrebel-3.0-M1/jrebel.jar    
  3. -Drebel.dirs=F:\MyEclipse7.0M1\eclipse\workspace\qhtjProject_new\WebRoot\WEB-INF\classes   

   个别参数说明:

         -javaagent:     这个是你使用的javaRebel(jRebel)的jar包的路径,注意其中的斜线方向。

         -Drebel.dirs=   这个是你要监控的项目的class文件路径(经过验证该参数可以不用设置,javaRebel会自动去监测class文件的修改情况)

 

    设置完成后,确定,返回。下来把tomcat的<Context   reloadable="false"  ............ />  reloadable="false"这里要设置成false才可以。至此,就算配置完成了,启动tomcat就会在控制台看到有关javaRebel(jRebel)的输入信息:

 

Java代码

  1. Mon Oct 26 17:46:15 CST 2009 com.zeroturnaround.javarebel.hD#new V( false )   
  2. Mon Oct 26 17:46:15 CST 2009 com.zeroturnaround.javarebel.bH#public boolean a(byte abyte0[])   
  3.   
  4. #############################################################   
  5.   
  6.  JRebel 3.0-M1 (200910151623)   
  7.  (c) Copyright ZeroTurnaround, Ltd, 2007-2009. All rights reserved.   
  8.   
  9.  A rough estimate: Over the last 1 days JRebel    
  10.  prevented the need for at least 0 redeploys/restarts.   
  11.  Using industry standard build and redeploy times,    
  12.  JRebel saved you between 0 and 0 hours.   
  13.   
  14.  This product is licensed to  Java Hack Organization   
  15.  for unlimited number of developer seats on site.   
  16.   
  17. #############################################################  

Mon Oct 26 17:46:15 CST 2009 com.zeroturnaround.javarebel.hD#new V( false )

Mon Oct 26 17:46:15 CST 2009 com.zeroturnaround.javarebel.bH#public boolean a(byte abyte0[])

 

#############################################################

 

 JRebel 3.0-M1 (200910151623)

 (c) Copyright ZeroTurnaround, Ltd, 2007-2009. All rights reserved.

 

 A rough estimate: Over the last 1 days JRebel

 prevented the need for at least 0 redeploys/restarts.

 Using industry standard build and redeploy times,

 JRebel saved you between 0 and 0 hours.

 

 This product is licensed to  Java Hack Organization

 for unlimited number of developer seats on site.

 

#############################################################

 

 

 

OK,到此就说明配置成功了,接下来,可以试试修改了java类文件后,还有没有容器自动加载的漫长过程了!!赶快去试一下吧!!!!

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值