IntelliJ IDEA

The JRebel plugin for IntelliJ IDEA includes the JRebel agent and helps you to automatically generate the JRebel configuration. It enables JRebel for applications and servers with a single click and improves the debugging support in the IDE.

Tip

Installing JRebel for the first time? Check out this handy Quick Start.

Note

JRebel for IntelliJ IDEA supports version 13.x or newer. Using IntelliJ IDEA version 12.x or older? Please download JRebel 6.2.5 for IntelliJ IDEA.


Installation

Install from plugin repositories

To install the JRebel Plugin for IntelliJ IDEA via IntelliJ repositories, follow these steps:

  1. Open the IntelliJ IDEA Settings... dialog. Select Plugins from the sections menu.
  2. Press Browse plugin repositories... and locate the JRebel plugin.
../_images/intellij-plugins-repository-list.png
  1. Press Install plugin to download and install the JRebel plugin for IntelliJ IDEA.

Tip

IntelliJ IDEA might warn you that JRebel plugin depends on WebSphere and WebLogic plugins that might be disabled or not available in case of IntelliJ IDEA Community Edition. This is totally fine. These dependencies are optional and you can either accept or decline the enabling of the corresponding plugins.

  1. IntelliJ will ask you to restart in order to complete the plugin installation. Make it so.

Install from ZIP archive

The plugin can be acquired also as a ZIP archive. All the released versions of the plugin are hosted at http://plugins.jetbrains.com/plugin/?id=4441.

To install the plugin from the ZIP archive, follow these steps:

  1. Download the latest version of the plugin from http://plugins.jetbrains.com/plugin/?id=4441.
  2. Once downloaded, open the IntelliJ IDEA Settings... dialog. Select Plugins from the sections menu. Press Install plugin from disk... to locate the plugin.
  3. Browse to the location of the downloaded ZIP archive.
  4. Press OK to confirm the installation. The IDE will ask you to restart in order to complete the plugin installation. Restart your IDE.

Upgrading to release version from nightly build

Note

Following this procedure is only required for IntelliJ IDEA 13 and IntelliJ IDEA 14 users.

  1. Access Settings (Preferences on Mac OS). Select Plugins.
  2. Locate JRebel for IntelliJ.
  3. Right-click the plugin name and select Uninstall.

Once done, reinstall the release version of JRebel for IntelliJ:

  1. Access Settings (Preferences on Mac OS). Select Plugins.
  2. Press Browse Repositories.
  3. Find JRebel. Press Install.

Activation

Following the installation, you probably won’t have a license yet. Once your IDE restarts, the JRebel plugin will notify you about this. This happens via a popup notification:

../_images/intellij-license-popup.png

Click the link in this popup. The JRebel activation window will open. If you closed the popup, you can also open this window from Help > JRebel > Activation.

This window contains two tabs: Try JRebel for FREE and I already have a license.


Try JRebel for FREE

To start your 14-day free JRebel Trial, fill out this form, select I agree with the terms & conditions of the JRebel License Agreement and press Activate JRebel. It’s as easy as that!

../_images/intellij-activation-jrebel.png

I already have a license

Open this tab if you already have a JRebel license. You can select one of three activation options:

../_images/intellij-activation2-jrebel.png
  • Activation code – Select this and paste your trial activation code in the text field. Press Activate JRebel to activate using the activation code.
  • Choose license file from the hard drive (jrebel.lic) – Select this option if you bought a license. We will send you a jrebel.lic license file using email. Press Browse and locate your jrebel.lic license file on the hard drive. Next, press Activate JRebel to activate using the license file.
  • Connect to License Server – Select this option if your network administrator supplies you with a License Server Group URL. The Group URL is a unique URL, consisting of the License Server address and a unique key. Paste the Group URL into the first field and input your email address into the second. Press Activate JRebel when done to activate using the License Server. JRebel 6 requires License Server 3 or newer for activation.

If everything went according to plan, you should now have a fully functional JRebel installed!


Project configuration

The only required configuration file is rebel.xml. This is used by JRebel to map the running application to the workspace. The good news is that IDE plugin can automate this configuration for you.

Right-click on the project node in the Project View and select JRebel > rebel.xml.

../_images/intellij-generate-rebel-xml-full.png

A dedicated configuration file should be generated for every module in the project. For more information please see the “Application configuration” chapter.

From this context menu you can also open the module configuration settings. To do this, right-click the desired module and select JRebel > Configure module.

Note

  • IntelliJ IDEA does not compile classes on save by default. Press Ctrl+Shift+F9 to compile the current file, module or package (you can also find this command via Build > Make Project).
  • Once you have generated rebel.xml, you need to redeploy your application to the server for the configuration to take effect.

If you would like to make modifications to the configuration file, please see the full reference for rebel.xml file format.

Note that when using either Maven or Gradle for your project, you might consider using the respective plugin for generating rebel.xml (and not the IDE plugin). For more information, please refer to either Maven plugin or Gradle plugin.


Tool window

The JRebel tool window provides an overview of JRebel configurations for the active project. This tool window displays a flat list of modules of the project. From here it is possible to quickly enable JRebel configuration for a particular module.

../_images/intellij-jrebel-tool-window.png

By selecting the jricon checkbox next to the module name, you will generate the rebel.xml configuration file that will be placed into the source tree of the project. For Maven projects it will be placed into src/main/resources so that it will be picked up automatically during the build.

Note

Please note that rebel.xml should be deployed to the application container with the application.


Server startup

The JRebel plugin for IntelliJ IDEA includes dedicated launch buttons. These buttons are located on the main toolbar and on the navigation toolbar by default. You can also find these commands via the Run menu.

../_images/intellij-jrebel-launch-buttons.png

The first button launches the container with JRebel. The second button launches the container with JRebel in debug mode.

By launching the process from one of these buttons, the JRebel plugin will automatically add the appropriate command line parameters.


External servers and remote servers

When launching the application server from a command line or using a remote server, open Help > JRebel > Configuration and select Startup. Select your desired

../_images/intellij-jrebel-startup.png
  • Run via IDE – This displays the server launch instructions from within the IDE.
  • Run locally from command line – Select this option to access JRebel’s integrated CLI instructions. You will be presented with a set of drop-down menus. Select your desired Java version and operating system to receive a set of pre-configured instructions. Follow the steps provided to start your external, command line server with JRebel enabled.
  • Run on a remote server – Select this option to configure JRebel in a JRebel Cloud/Remote setting. Follow the steps provided.

You can also find the CLI instructions within this manual: Running the container from command line.


Disable automatic application deployment

Open the Run/Debug Configuration for the corresponding application server via Run > Edit Configurations. On the Server tab, set On frame deactivation to Do nothing.

../_images/intellij-rundebugconf.png

Now you can use the Run with JRebel and Debug with JRebel launch buttons to start the selected configuration with JRebel.


JRebel Support

You can quickly get in touch with JRebel Support using the embedded support dialog in Help > JRebel > Submit a Support Ticket.

From here, describe your issue and specify your email address for further contact. Enable trace level logging to give JRebel Support more information on what went wrong and choose to add the log files to the support ticket. Press Send when ready.

../_images/intellij-support.png

Updating the IntelliJ IDEA plugin

  1. Open Help > Check for Update.
  2. Select JRebel from the list when available.
  3. Press Update to continue.
  4. Complete the installation.
  5. Restart IntelliJ IDEA.

Note

To verify you current JRebel version, open Help > JRebel > Configuration and select the Advanced node. Find your current plugin version. When upgrading from very old plugin versions, a complete plugin uninstall and new version install is recommended instead.


IDE log level configuration

You can configure the JRebel IDE plugin log level using a command line parameter. You can add this parameter to your {user.home}/.jrebel/jrebel.properties file.

rebel.ide.log=[off|error|warn|info|debug|trace]

The default value for this property is info. The JRebel IDE plugin log file itself is stored in {user.home}/.jrebel/.