Eclipse

Some optional features may require additional Eclipse plugins, such as Web Tools Platform.

The JRebel plugin for Eclipse includes JRebel Agents and it helps you automatically generate the JRebel configuration. It also enables JRebel for applications and servers with a single click and improves the debugging support in Eclipse.

Note

  • As of JRebel 6.2.7, Eclipse 3.6 or newer is required. When running Eclipse 3.3 up to 3.5, please download JRebel 6.2.6 instead.

  • As of JRebel 2021.3.1, Eclipse 4.6 or newer is required. When running Eclipse 3.6 up to 4.5, please download JRebel 2021.3.0 instead.


Installation

Eclipse Marketplace

To install JRebel for Eclipse, open Help > Eclipse Marketplace…. Opening it for the first time may ask you to pick a solution catalog. Select Eclipse Marketplace when prompted.

Search for JRebel. Click Install once found.

../_images/eclipse-marketplace-jrebel.png

Update site

Open Help > Install New Software… and enter the URL for our update site: http://update.zeroturnaround.com/update-site/.

../_images/eclipse-update-site-jrebel.png

To speed up the process, you can deselect Contact all update sites… (when you already have all prerequisites). The Eclipse IDE for Java EE Developers package should contain everything you need.


ZIP archive

The plugin can also be downloaded as ZIP archive from http://update.zeroturnaround.com/update-site/update-site.zip.

Once downloaded, open Help > Install New Software… and press Add…. Select Archive… to point to the ZIP archive of the update site. Press OK to proceed.


Installation details

The next installation step allows you to select the features to install. JRebel for Eclipse (4.6+) is the primary JRebel package. It contains:

  1. JRebel (required) is the default embedded JRebel plugin for Eclipse. This includes the complete JRebel installation and its latest stable version. Once installed, you only need an active license to start work. This should be installed by everyone.

  2. JRebel for Java EE is an optional recommended plugin. This is recommended when you actively use Web Tools Platform (WTP) with JRebel.

  3. JRebel m2eclipse (requires m2eclipse plugin) is an optional plugin. This allows generating the rebel.xml configuration file with jrebel-maven-plugin in m2eclipse builds.

JRebel for MyEclipse (2017 and later) are the dedicated MyEclipse packages.

Once you have selected the features you want, click Confirm. You will also be asked to accept the JRebel License Agreement. Your IDE will restart once the installation is finished.


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/eclipse-license-popup.png

Click the Activate your Trial link in this popup and the JRebel Activation window will open. You can also open this window from Help > JRebel > Activation. Alternatively, click Watch a JRebel video to view a quick introductory video (this opens a browser window).

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/eclipse-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/eclipse-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

JRebel requires just one configuration file: rebel.xml. This is used by JRebel to map the running application to the workspace. The good news here is that the IDE plugin can automate the configuration for you. In fact, rebel.xml is generated automatically once you enable JRebel nature for the project.

../_images/eclipse-add-jrebelnature-jrebel.png

You can also enable JRebel nature from Help > JRebel > Configuration. Open the Projects tab to see a list of all your current workspace projects. A checkbox in the jricon column for every project indicates whether the JRebel nature is enabled or disabled for that project. Selecting the checkboxes for any projects will enable JRebel nature for them. This will also automatically generate the rebel.xml configuration file.

../_images/eclipse-jrebel-config-center-enable-nature.png

Note

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 Maven or Gradle to build your project, you can alternatively use the respective build tool plugin for generating rebel.xml (instead of the IDE plugin). This is recommended when issues with the IDE-generated rebel.xml present themselves. For more information, please refer to either Maven plugin or Gradle plugin.

Note

Adding JRebel Nature to a project will automatically generate rebel.xml in the project source (if the file did not exist before). To disable this behaviour, append rebel.ide.autogenerate_rebel_xml=false to $USER_HOME/.jrebel/jrebel.properties and restart Eclipse.

The rebel.xml file will still be generated when accessing Project Properties > JRebel and pressing the Generate now! button.


Using relative paths in rebel.xml

Refer here for instructions. This is the way to go if you want to commit your rebel.xml and share the configuration with the whole team.


Automatic build

JRebel does not compile Java code on its own. It relies on the compilation results from the Java compiler. For a smooth user experience with JRebel it is recommended to enable the automatic build feature, also known as compile-on-save. You can enable this option from Project > Build Automatically.

../_images/eclipse-build-automatically.png

Server configuration

Application server configuration can be found via Help > JRebel > Configuration > Startup. In this view, select the option you use to run your application server.


Run via IDE

Help > JRebel > Configuration > Startup > Run via IDE displays all application servers configured for the IDE. Select the checkbox next to any server to add the required JVM arguments to the server startup configuration. Automatic publishing will be disabled in the server configuration to prevent unintended automatic redeploys.

../_images/eclipse-jrebel-server-config.png

Run locally from command line

When running your application servers externally (for example using a command line), open Help > JRebel > Configuration > Startup > Run locally from command line. Select your desired Java version and application server. Follow the instructions to generate a startup script or a new run configuration.


Run on a remote server or VM

When using JRebel with remote server support (either locally for a virtual machine, a physical remote server or cloud), open Help > JRebel > Configuration > Startup > Run on a remote server or VM. Select your desired Java, application server and operating system. Follow the instructions to download JRebel onto the remote server and generate the startup script.


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 JRebel Agent 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/eclipse-support.png

Updating the JRebel for Eclipse plugin

  1. Open Help > Check for Updates.

  2. Select the following JRebel plugin components from the update list: JRebel, JRebel for Java EE, JRebel m2eclipse.

  3. Press Next to continue.

  4. Review the terms and agreements and complete the installation.

  5. Restart Eclipse.

Note

To verify you current JRebel version, open Help > JRebel > Configuration and select the Advanced tab. Refer to the JRebel agent section to 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 or eclipse.ini.

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

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