Excellent programmers (java)-powerful tool-hot deployment of jrebel Installation

Source: Internet
Author: User

In the previous article, I mentioned that jrebel can match multiple types of IDE and framework, and the rules should be formulated according to the specific IDE.

Let me introduce the Eclipse most familiar to java programmers.
Installing JRebel for Eclipse:
If it is eclipse version 3.6, it is not available before Help-> Eclipse Marketplace. For example:
650) this. width = 650; "style =" width: 562px; height: 476px "alt =" "width =" 544 "height =" 476 "src =" http://www.bkjia.com/uploads/allimg/131228/125T025M-0.png "/>

If the version is 3.3, 3.4, 3.5, Go to Help-> Install New Software
Add: http://www.zeroturnaround.com/update-site plug-in address

650) this. width = 650; "style =" height: pixel PX "alt =" "width =" 562 "height =" 476 "src =" http://www.bkjia.com/uploads/allimg/131228/125T02443-1.png "/>

 

I chose eclipse3.6. After installing the plug-in, let's take a look at the changes.
1. in $ {eclipse_home} \ plugins \ org. zeroturnaround. eclipse. embedder_4.6.1.201203151351 can view jrebel information. Under the current directory \ bin, double-click cmd or you can see some operation interfaces. These interfaces can also be configured through eclipse visualization.
2. next, let's take a look at eclipse. From Windows-& gt; Preferences, we can see a Jrebel, and select Use embeded Jrebel (version ), you can select a jar package in another path.
3. Double-click server-> tomcat
650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; height: 503px; border-top: 0px; border-right: 0px "title =" wtp-server "border =" 0 "alt =" wtp-server "width =" 562 "height =" 476 "src =" http://www.bkjia.com/uploads/allimg/131228/125T03I0-2.png "/>

A JRebel configuration is added in the lower right corner. For details, see the red line. Configure:
3.1 change release to Never automatic release,
3.2 select Enable JRebel agent. This is enough.
3.3 If You Want To select Enable debug logging, You need to configure the log information. Click Lauch JRebel Agent Settings. You can select Show JRebel message in standard output (output on the console), and Log to file and output it to the Log file. This configuration is the agent-setting.cmd mentioned in description 1 under \ bin ). If the Log Path is not set, the system may prompt that the log information cannot be found.
4. Click Open JRebel agent to view the jrebel. properties and jrebel.info directory. The configuration file is synchronized with the visual interface. We will try to add plug-ins such as spring to see if they are supported.

Next we will try a project: new-project
Then deploy it to tomcat to check whether the printed information is available and try to modify the information to view the Console
650) this. width = 650; "style =" border-bottom: 0px; border-left: 0px; width: 434px; height: 182px; border-top: 0px; border-right: 0px "title =" image "border =" 0 "alt =" image "width =" 533 "height =" 182 "src =" http://www.bkjia.com/uploads/allimg/131228/125T0J94-3.png "/>

See the print:
JRebel: Starting logging to file: D: \ java \ jrebel. log
..................
..................
This license will expire in 27 days and JRebel will
...............
...............
JRebel: Classes in the following packages are not going to be instrumented: com. hot
For a slight explanation:
The first is the log output file, which is set in D: \ java \ jrebel. log
The second is that my license is available for 27 days.
Third, it is set in Agent Setting. Enabling filter rules will not be detected in com. hot.

Although JRebel is successfully configured, we still have a file. It seems that rebel. xml has been available since version 2.0 and must be configured in the root directory of each project.
Here is an example:

<?xml version="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.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd"> 
<classpath>  <dir name="c:\myWorkspace\myWar\target\classes"/>
 <dir name="c:\myWorkspace\myWar\src\main\resources"/>
</classpath> <web>  <link target="/">
    <dir name="c:\myWorkspace\myWar\src\main\webapp"/>
 </link> <link target="/jsps/">
    <dir name="c:\myWorkspace\myWar\src\main\jsps"/>
 </link> </web> </application>

Then test:
1) jsp modified successfully!
2) servlet, common JAVA class, method, and attribute added successfully!
3) A new JAVA class is added!
4) failed to add a new servlet! At this time, I am using servlet3, the annotation used, and spring annotation is supported, so it should not be an annotation problem. Considering tomcat itself is a servlet container, this part is not clear yet, however, I tried to use the original configuration method and still failed to add servlet.
5) configuration file
Except for initial system information such as web. xml, other non-system files such as. properties can be configured successfully! Add and modify files.

Summary:
Now, let's go here today and try to talk about how to configure JRebel and other practical skills in the next article. If you are interested, you can continue to learn about the configuration of Build-Tools and IDE-independent JRebel.

This article is from the "scholar" blog, please be sure to keep this source http://yjplxq.blog.51cto.com/4081353/840001

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.