NetBeans

Installation

Note

The current version of the plugin is compatible with NetBeans IDE 8.2 or newer. The installation may vary depending on NetBeans IDE version and operating system.


JRebel for NetBeans contains the JRebel Agent and it allows you to automatically generate JRebel configuration for projects. It also enables JRebel for applications and servers with a single click, and improves the debugging support in the IDE.

The NetBeans plugin portal only allows open-source plugins, which means that the proprietary JRebel for NetBeans plugin cannot be hosted directly. As a workaround, the open-source JRebel for NetBeans Installer plugin was created. It adds a custom Update Center to your NetBeans configuration and installs the proprietary JRebel for NetBeans plugin from the update site, allowing you to access JRebel functionality.

Read through the following installation methods to decide which is right for you.


Install from NetBeans plugins

To install via NetBeans Available Plugins, follow these steps:

  1. Open Tools > Plugins and select the Available Plugins tab.

  2. Next to the JRebel for NetBeans Installer plugin, select the checkbox and press Install to continue.

  3. Continue through the installation wizard. When prompted, agree to the license agreement and restart your IDE.

Note

The instructions above apply to first-time installations only. If you have previously removed JRebel for Netbeans and are reinstalling it, follow these additional steps:

  1. Open Tools > Plugins. Select the Available Plugins tab.

  2. Select the checkbox next to the JRebel for NetBeans plugin and press Install to continue.

  3. Continue through the installation wizard. When prompted, agree to the license agreement and restart your IDE.


Note

For NetBeans 9 and 10, the Update Centers must be configured to include the NetBeans 8.2 repository that contains required JavaEE modules.


Install from NBM archive

To download and install a particular version of the JRebel plugin as an NBM archive, follow these steps:

  1. Go to https://plugins.netbeans.apache.org/catalogue/?id=60 and download the NBM archive version that you want.

  2. Open Tools > Plugins.

  3. Select the Downloaded tab and press Add Plugins… to continue.

  4. Select the downloaded NBM archive and press Open. Press Install to continue.

  5. Continue through the installation wizard. When prompted, agree to the license agreement and restart your IDE.


Install manually from Update Center

To skip Install from NetBeans plugins and add the Update Center manually, follow these steps:

  1. Open Tools > Plugins.

  2. Select the Settings tab and press Add to continue.

  3. From the Update Center Customizer window, add the following information:

    • In the Name field, type JRebel for Netbeans.

    • In the URL field, type https://dl.zeroturnaround.com/jrebel/netbeans/updates.xml.

  4. Press OK to continue.

  5. Select the Available Plugins tab.

  6. Next to the JRebel for NetBeans plugin, select the checkbox and press Install to continue.

  7. Continue through the installation wizard. When prompted, agree to the license agreement and restart your IDE.


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!


Server configuration

JRebel is automatically enabled for all servers and standalone projects launched from NetBeans. To review these settings, open Help > JRebel > Configuration and select the Startup tab.

From here, you can review all servers configured for your NetBeans as well as any standalone applications in your workspace.

../_images/netbeans-enable-jrebel.png

When running your application servers externally (for example using a command line), select the Run locally from command line radio button in the Startup tab. Select your desired Java and application server type. Follow the instructions to generate a startup script or new configuration.

../_images/netbeans-startupcli-jrebel.png

When using remoting/cloud for JRebel, select the Run on a remote server radio button in the Startup tab. Select your desired Java, application server and operating system. Follow the instructions to download JRebel onto the remote server and generate the startup script.


Project configuration

JRebel requires just one configuration file to work its magic. This file is rebel.xml and it maps the running application to the workspace. This configuration file has to be present for projects executed on the local machine, with the application server being run from the IDE or from a command line. The JRebel IDE plugin can automate the configuration creation for you. The XML file is also automatically generated for your convenience.

Open the Window menu and select JRebel panel to display the dedicated JRebel tool panel in the workspace. You can also open this panel by right-clicking the JRebel file node in the project view and selecting Open JRebel panel.

../_images/netbeans-jrebel-toolwindow.png

This tool window lists all projects currently available in the workspace. Selecting the first checkbox next to a module name will automatically generate the rebel.xml configuration file. This file will be generated within the application’s source files. In case of Maven projects, this file will be placed into src/main/resources. This ensures that it will be picked up automatically during the build. The second checkbox should be selected only when using JRebel remote server support.

Note

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

A dedicated configuration file should be generated for every module in the project. For more information please refer to the application configuration chapter.

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 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.


Disable deployment on save

In order to prevent unintended redeploys, the Deploy on Save option for the project has to be disabled. To do this, right-click the project and select Properties. Select Run and deselect the Deploy on Save checkbox.

../_images/netbeans-disable-deploy-on-save.png

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/netbeans-support.png

Updating the NetBeans plugin

  1. Open Tools > Plugins.

  2. Find JRebel NetBeans IDE Plugin from the Updates list.

  3. Press Update to continue.

  4. Complete the installation.

  5. Restart NetBeans.

Note

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


Troubleshooting

It is possible to override the default NetBeans action associated with the IDE commands for Run and Debug (or execute custom actions directly). You can engage actions that will be executed in a separate JVM by Maven – to which NetBeans cannot directly pass JVM arguments (mvn jetty:run being one such example). In that case, the argument enabling JRebel would not get passed. Using the following option in Maven launch configuration might help you:

Env.MAVEN_OPTS="-agentpath:/path/to/your/jrebel"

If you do not wish to hard-code the path, you can use a JRebel NetBeans plugin metavariable that replaces the path:

Env.MAVEN_OPTS="-agentpath:${current.jrebel.agent.path}"

For more information, please refer to running server from command line.


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