IntelliJ IDEA & JRebel tutorial
In this document we’ll cover how to setup JRebel (formerly JavaRebel) for your project while using IntelliJ IDEA as your IDE of choice. We’ll be covering general configuration tips and the two plugins that we have for IntelliJ IDEA users. We concentrate mostly on the 8.x version of IDEA, though sections 1-2, 5 and 6 also apply for 6.x and 7.x users.
Contents:
- STEP 1: Install JRebel
- STEP 2: Installing JRebel IntelliJ IDEA plugin
- STEP 3: Configure the 8.x plugin
- STEP 4: Make a rebel.xml for your application
- STEP 5: Launch application with JRebel
- STEP 6: General IntelliJ IDEA tips
- STEP 7: Success!
STEP 1: Install JRebel
Latest stable version of JRebel can be downloaded here. Unpack it to a directory of you choice.

STEP 2: Installing JRebel IntelliJ IDEA plugin
IntelliJ IDEA 8.x
The plugin is hosted at the central IntelliJ plugin repository. The easiest way to install is to go to File » Settings » Plugins in IntelliJ and use the built-in interface for installing. The plugin name is JRebel Plugin (formerly JavaRebel). If you have previously installed the JavaRebelIdeaDebuggerPlugin please uninstall it. You can check out the plugin page for more information about the releases of the plugin.
STEP 2b: IntelliJ Idea 6.x, 7.x
We have a different plugin for older releases of IntelliJ. The plugin name is JavaRebelIdeaDebuggingPlugin and is installed the same way as the 8.x plugin. You can check out the plugin page for more information about the releases of the plugin.
If you are interested in working with the older plugin for older versions of IntelliJ, you can skip to the General IntelliJ IDEA tips section as the following steps are IDEA 8.x specific.
STEP 3: Configure the 8.x plugin
Configuring the JRebel plugin is easy – there’s only one step: Specify the javarebel.jar location on your filesystem. Later on this javarebel.jar will be used to start your container. The option is located at Settings » JavaRebel » JavaRebel location.

You should also configure the debugger to ignore synthetic methods. To do that open up debugger properties (File -> Settings -> Debugger). On the lower left corner of the debugger settings page make the necessary changes. Be sure to tick Skip synthetic methods checkbox. You should also untick the checkbox Synthetic fields in the Show block of File -> Settings -> IDE settings -> Debugger -> Data Views
STEP 4: Make a rebel.xml for your application
The rebel.xml configuration file controls how JRebel propagates updates to your application. Specially, it allows you to have a WAR/EAR application deployed as one file to pick up updates made to the project files in the workspace. For this to work you’ll need to have one rebel.xml file per module. This includes both web and EJB modules. The rebel.xml configuration file should end up in the WEB-INF/classes directory in case of a web module and in the jar root in case of an ejb module.
Now JRebel plugin can generate the necessary rebel.xml file for you. Remember though – since it generates this file on a per project basis, you have to be careful if you have more than one module corresponding to that project. If you do, you should edit the rebel.xml file manually as described in the Installation manual.
To generate the rebel.xml file right click on your project and pick Generate rebel.xml.

Repeat this for all projects that you’d like to update with JRebel.
The generated rebel.xml will use absolute paths to your project, so you might want to edit it manually and replace the absolute path with a system property as described in the Tips and Tricks section of the Installation manual. If you use Maven you may prefer to use the JRebel Maven plugin that will generate the rebel.xml in accordance with the module pom.xml as described in the Maven Plugin configuration manual.
STEP 5: Launch application with JRebel
This plugin introduces 2 new launch buttons. One for starting the container with JRebel and the other for starting the container in debug mode with JRebel enabled.

STEP 6: General IntelliJ IDEA tips
- Develop in exploded mode
- Make sure that you don’t package modules as war/jar files (unless using rebel.xml)
- Set the output directory to the respective WEB-INF/classes
- This is done via Module Settings » Output and JavaDoc » Output path
- Turn off automatic application deployment
- Settings » Project Settings » Compiler » Deploy web applications to server after compilation
- Ease the compilation process
- IDEA saves files when you compile them.
- Make sure all dependent files are also compiled.
- Settings » Project Setting » Compiler » Honor dependencies on “Compile” command
- Start using the default compile shortcut Ctrl-Shift-f9 or map it to Ctrl-s (files get still saved).
STEP 7: Success!
To check that the installation was successful access a page that uses a class, change that class in the IDE, press Save, access the page again and look for the following message in the console:

Now that you’re up and running, it’s time to enjoy coding without the need to redeploy. If you have any specific questions about this plugin, the Plugin forum is the best place to ask, so that other people get to hear the answer as well. Otherwise, you can contact us at support@zeroturnaround.com or give us a quick mention on your blog or via twitter (you can even follow us here).
Have a great day!










