[Eclipse] - 整合Tomcat熱載入外掛程式

來源:互聯網
上載者:User

標籤:style   blog   http   color   ar   使用   java   sp   檔案   

使用Eclipse + Tomcat,要使用熱載入,總是會重啟tomcat webapp。

可以使用這個外掛程式:jrebel

如果是Tomcat 7.0+版本,需要使用jrebel5.5.1+的版本,不然總會報一些錯誤。

 

使用方法:

1) 下載jrebel 5.5.1+

 

2) 右鍵項目,選擇:

 

3) 找到"VM arguments":

裡頭填入:

-Dcatalina.base="E:\JavaProject\.metadata\.plugins\org.eclipse.wst.server.core\tmp0" -Dcatalina.home="D:\Program Files\apache-tomcat-7.0.54" -Dwtp.deploy="E:\JavaProject\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps" -Djava.endorsed.dirs="D:\Program Files\apache-tomcat-7.0.54\endorsed"-noverify -javaagent:F:\Tools\Java\jrebel\jrebel.jar-Drebel.dirs=E:\JavaProject\obs\WebContent\WEB-INF\classes-Drebel.spring_plugin=true-Drebel.struts2-plugin=true

說明:

-noverify:解壓的jrebel.jar檔案地址

-Drebel.dirs:項目編譯的classes地址

-Drebel.spring_plugin:使用了spring,設為true

-Drebel.struts2-plugin:使用了struts,設為true

 

4) 把eclipse的tomcat啟用自動載入功能停了,以防止它總是自動重啟tomcat

 

好了,現在修改一個java方法,儲存試試。^o^

[Eclipse] - 整合Tomcat熱載入外掛程式

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.