1、myeclipse的安装方法:
jrebel 5 for myEclipse (8-10 )配置
1、下载jrebel5.0,解压到指定目录。
2、下载破解的jrebel.jar,替换原来的jrebel.jar破解jrebel。
3、下载jrebel for myeclipse插件。在myEclipse根目录新建myplugin目录,在其中再建jrebel目录。将jrebel for myeclipse插件压缩包中的features、plugins解压到jrebel目录下。在MyEclipse Blue Edition 8.5目录dropins文件夹下新建txt文件,txt文件中输入内容
path=X:..\\myplugin\\jrebel(jrebelfor myeclipse插件绝对路径),
然后保存并重命名为jrebel.link。重启myeclipse
4、myeclipse中配置jrebel。先Window->Preferences下选中JRebel,通过点击“Browse”选中jrebel.jar来指定jrebel.jar路径。然后填写重部署的估计时间。(此处一定要填不然过不去)
window->preference->tomcat->Tomcat6.x->JDK页,在Optional Java VM arguments下,加入以下参数
-noverify
-javaagent: .\jrebel\jrebel.jar 这里自行修改jrebel.jar正确的路径(绝对路径)
5、生成jrebel.xml。右键工程,选择JRebel->Generaterebel.xml ...,然后选择保存路径,
查看保存的rebel.xml格式如下:
<?xmlversion="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns="http://www.zeroturnaround.com"xsi:schemaLocation="http://www.zeroturnaround.comhttp://www.zeroturnaround.com/alderaan/rebel-2_0.xsd">
<classpath>
<dir name="X:/xxxx/WebRoot/WEB-INF/classes">
</dir>
</classpath>
<web>
<link target="/">
<dir name="X:/xxxx/WebRoot">
</dir>
</link>
</web>
</application>
6、现在可以Myeclipse下启动tomcat了。刚启动时会打印如下信息,则表示破解成功。
[2012-07-17 11:22:57] #############################################################
[2012-07-17 11:22:57]
[2012-07-17 11:22:57] JRebel 5.0.0 (201206080930)
[2012-07-17 11:22:57] (c) Copyright ZeroTurnaround OU, Estonia, Tartu.
[2012-07-17 11:22:57]
[2012-07-17 11:22:57] Over the last 1 days JRebel prevented
[2012-07-17 11:22:57] at least 0 redeploys/restarts saving you about 0hours.
[2012-07-17 11:22:57]
[2012-07-17 11:22:57] This product is licensed to Unlimited
[2012-07-17 11:22:57] For FUN! Unlimited! Enjoy!
[2012-07-17 11:22:57]
[2012-07-17 11:22:57] The following plugins are disabled at themoment:
[2012-07-17 11:22:57] * Apache MyFaces plugin (set-Drebel.myfaces_plugin=true to enable)
[2012-07-17 11:22:57] * Click plugin (set -Drebel.click_plugin=true toenable)
[2012-07-17 11:22:57] * JRuby Plugin (set -Drebel.jruby_plugin=true toenable)
[2012-07-17 11:22:57] * Jersey plugin (set -Drebel.jersey_plugin=true toenable)
[2012-07-17 11:22:57] * Oracle ADF Core plugin (set-Drebel.adf_core_plugin=true to enable)
[2012-07-17 11:22:57] * Oracle ADF Faces plugin (set-Drebel.adf_faces_plugin=true to enable)
[2012-07-17 11:22:57] * Seam-Wicket plugin (set-Drebel.seam_wicket_plugin=true to enable)
[2012-07-17 11:22:57] * WebObjects plugin (set -Drebel.webobjects_plugin=trueto enable)
[2012-07-17 11:22:57]
[2012-07-17 11:22:57]#############################################################
java.lang.OutOfMemoryError:PermGen space问题的解决
Exception in thread "btpool0-1"java.lang.OutOfMemoryError: PermGen space ...
以前在使用MyEclipse时,经常遇到PermGen space问题,解决办法无非是更改MyEclipse的配置文件,增加其运行
JVM时申请的内存.但是这次是由Javarebel启动程序...
参考链接:
http://www.zeroturnaround.com/jrebel/faq,
.于是照此修改Javarebel的参数:
-Xmx512M -Xms512M -XX:MaxPermSize=1024m
各个配置的详细解释参考链接:
:http://hi.baidu.com/futily/blog/item/cffb330fb0c22ee4ab6457fc.html
堆内存分配:
-Xms JVM初始分配的内存由-Xms指定,默认是物理内存的1/64;
-Xmx JVM最大分配的内存由-Xmx指定,默认是物理内存的1/4;
默认空余堆内存小于40%时,JVM就会增大堆直到-Xmx的最大限制;空余堆内存大于70%时,JVM会减少堆直到-Xms的最小限制。
因此服务器一般设置-Xms、-Xmx相等以避免在每次GC 后调整堆的大小。
非堆内存分配
-XX:PermSize JVM使用-XX:PermSize设置非堆内存初始值,默认是物理内存的1/64;
-XX:MaxPermSize 由XX:MaxPermSize设置最大非堆内存的大小,默认是物理内存的1/4。
特别注意事项
参数中
-Xms的值要小于-Xmx,
-XX:PermSize的值要小于-XX:MaxPermSize;
-Xmx的值和-XX:MaxPermSize的总和应不超过JVM内存的最大限制,比如当前操作系统最大内存限制,或者实际的物理内存等等。
2、eclipse安装方法和myeclipse大同小异,只是不需要myeclipse插件,