javaRebel(jRebel)使用手记

    想必大家对项目开发中,调试类文件修改时,容器自动重新加载漫长的过程早已厌倦,我今天闲来无事,于是,想试试javaRebel  (jRebel)这个东西,javaRebel(jRebel)现在是收费软件,不过在网上可以下载到确解版的。在网上查了一下相关资料,可以实现修改类文件后,不用容器重新加载的功能,高兴之余顺手一试高下,先是下载了MyEclipse7.0(包括了eclipse)安装之,想在一个全新环境下试用一下javaRebel(jRebel),MyEclipse7.0安装使用顺利完成,在安装试用javaRebel(jRebel)的时候,算是费了不少力气(高手这里见笑了),因此,做此记录,希望对想要使用javaRebel(jRebel)的人,在安装时碰到问题,能起到一个参考作用。

 

    从网上查到的资料中,提到了两种安装方式,一种是eclipse的插件方式,一种是直接设置tomcat的jvm参数的方式,本来想用第一种方式来的直观,结果,从官网上更新了插件后,根据官方提供的安装方法(How to install and use JRebel in Tomcat, JBoss or Jetty with the Eclipse IDE  http://www.zeroturnaround.com/blog/how-to-install-and-use-jrebel-formerly-javarebel-in-tomcat-with-the-eclipse-ide/),到了第4步,硬是点不出来那个设置的对话框,找了老半天也没有找到,不知道是怎么回事!希望安装成功能高手能详细的说一下是怎么操做的。

 

    无耐,又选择用第二种方法来安装,第二种方法的安装比较简单,但是,在设置jvm参数的时候,也要注意一些细节,具体的方法就是(此处以tomcat6为例):window-preferences-servers-tomcat-tomcat 6.x-jdk-Optional java vm arguments这个框里面输入java vm的参数,具体设置如下:

 

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

 

   个别参数说明:

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

         -Drebel.dirs=   这个是你要监控的项目的class文件路径

 

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

 

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
    评论
eclipse和网上找到的破解包提取打包成无依赖,独立java程序可用的版本。独立java程序启动的时候增加如下的JVM参数即可 -server -Xmx512m -XX:MaxPermSize=128m -Djava.awt.headless=true -Drebel.spring_plugin=true -noverify -javaagent:D:\apps\jrebel6.4.3\jrebel.jar -Xbootclasspath/p:D:/apps/jrebel6.4.3/rebelboot.jar -Drebel.base=D:\apps\jrebel6.4.3\.jrebel -Drebel.disable_update=true D:\apps\jrebel6.4.3这个为解压后的路径,rebel.base参数指定了jrebel.lic所在的位置,因此无需拷贝到用户目录下。 控制台可以看到如下的输出表示jrebel配置成功。 2016-07-13 11:42:59 JRebel: WARN You are running JRebel using the -javaagent option on a system where -agentpath is supported. 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:02 JRebel: ############################################################# 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:02 JRebel: JRebel Agent 6.4.3 (201604210950) 2016-07-13 11:43:02 JRebel: (c) Copyright ZeroTurnaround AS, Estonia, Tartu. 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:02 JRebel: Over the last 1 days JRebel prevented 2016-07-13 11:43:02 JRebel: at least 1 redeploys/restarts saving you about 0 hours. 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:02 JRebel: Licensed to VIMACER (ZeroTurnaround) 2016-07-13 11:43:02 JRebel: with the following restrictions: 2016-07-13 11:43:02 JRebel: ### Hello World Cracked ### :) 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:02 JRebel: License type: enterprise 2016-07-13 11:43:02 JRebel: Valid from: July 14, 2014 2016-07-13 11:43:02 JRebel: Valid until: August 18, 2888 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:02 JRebel: ############################################################# 2016-07-13 11:43:02 JRebel: 2016-07-13 11:43:04 JRebel: Monitoring Log4j configuration in 'xxxxx/log4j.properties'. 2016-07-13 11:43:06 JRebel: Monitoring properties in 'xxxxx\xxxx.properties'. 2016-07-13 11:43:32 JRebel: Reloading class 'xxxxx'. 2016-07-13 11:43:32 JRebel: Reconfiguring bean 'xxxxx' [xxxxx]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值