Tag Archives: jrebel

JRebel and JBoss integration with WAR file

jreb
You may know about JRebel project. It’s very helpful for development in java world.
The following steps describe how to use JRebel for Web application:

1. Install JRebel plugin for your IDE.

2. Create file descriptor rebel.xml with JRebel plugin in your IDE in WEB-INF\classes folder like:

<?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="D:/project/idea/out/production/projectUI">
   </dir>
 </classpath>

 <web>
   <link target="/">
   <dir name="D:/project/src/projectUI/src/main/webapp">
   </dir>
   </link>
 </web>

</application>

3. Add the argument to JBoss AS start script:

-javaagent:C:/Users/UserName/.IntelliJIdea14/config/plugins/jr-ide-idea/lib/jrebel/jrebel.jar

Here is the path to jrebel.jar file placed after installation.

4. Deploy your application on JBoss.

5. Change some code and make (recompile) the project.

6. See the changes! Profit!

Thanx, zeroturnaround!