JRebel for Cloud in Eclipse

This section lists the steps required to set up JRebel for Cloud on Eclipse. You need a working, activated JRebel installation in your IDE. Please follow the instructions on how to install and configure JRebel for Eclipse.


1. Enable JRebel remote server support on the server

Running JRebel on a remote server requires the JRebel agent and a launch parameter. Follow the instructions:

  1. Download the standalone JRebel archive and extract its contents. Upload the contents to the remote server and make a note of their location.

  2. Add -agentpath:[/path/to/]JRebel library attribute to the server startup parameters. Select the correct JRebel library based on the remote server operating system and architecture (read more here). This guarantees that JRebel is started with the server.

  3. Add the -Drebel.remoting_plugin=true attribute to the server startup parameters.

Here is an example of a server startup script with both JRebel (Windows 64-bit) and remote server feature enabled:

-agentpath:[/path/to/]libjrebel64.dll -Drebel.remoting_plugin=true

Enabling password authentication

To enable JRebel password authentication on the server, use the -set-remote-password <NewPassword> CLI command. Doing this will require all connecting JRebel IDE plugins to be configured with the same password for successful synchronization.

Note

Use the following parameter to remove the password from the server: java -jar jrebel.jar -disable-remote-password


How do I know this works?

Once you have successfully configured JRebel remote server support for your remote server, you should see the following banner during remote server startup:

2024-04-02 14:23:55 JRebel:  #############################################################
2024-04-02 14:23:55 JRebel:
2024-04-02 14:23:55 JRebel:  JRebel Agent 2024.1.0 (202001051049)
2024-04-02 14:23:55 JRebel:  (c) Copyright 2007-2024 Perforce Software, Inc.
2024-04-02 14:23:55 JRebel:
2024-04-02 14:23:55 JRebel:  JRebel started in remote server mode.
2024-04-02 14:23:55 JRebel:
2024-04-02 14:23:55 JRebel:  #############################################################

2. Add a workspace server

  1. Open Help > JRebel > Configuration. Select the Remote servers tab. You will be presented with the following view:

    ../_images/eclipse-remoteservers-jrebel.png
  2. Press Add server. The following dialog will open:

    ../_images/eclipse-remoteservers-addnew-jrebel.png

    Provide the remote server information:

    • Server name – Provide a name for the remote server.

    • Server URL – Provide the full URL for the server.

    You can expand the Security settings section to enforce stricter server security:

    • Server authentication – Enable additional synchronization security. Specify a simple alphanumeric password. The password also needs to be set on the server: java -jar jrebel.jar -set-remote-password <NewPassword>.

    • HTTP Basic authentication – Enable HTTP authentication when your remote server requires it.

    Tip

    Press Test connection to immediately test the server URL. This test will ping the server for JRebel, verifying its presence and correct version.

  3. Press Save to store the new remote server.

This server can now be used by all projects in your workspace. Any new servers added from this view are automatically enabled for workspace synchronization. To disable a workspace server, deselect the checkbox in front of the server name.


3. Configure projects for remote server support

  1. Open Help > JRebel > Configuration. Select the Projects tab. The following table will open:

    ../_images/eclipse-jrebel-config-center-enable-nature.png
  2. Select the jrcloudicon checkbox for your project.

    Note

    The configuration file rebel-remote.xml is created in the project resources folder.

  3. Build and redeploy your application containing the rebel-remote.xml configuration file to the remote server.

  4. You are set!

Tip

By default, all configured projects inherit the workspace server settings.

To configure your workspace projects for a customized remote server setup, press the pencil icon next to the project name. The project properties window is opened for remote servers. The following options are available:

  • Off – No remote server synchronization functionality is applied to the project.

  • Use all active workspace servers – Once remote servers have been defined and enabled via Help > JRebel > Configuration > Remote servers, all of them will be used for synchronization of this project. This option provides a simpler configuration when working with just one remote server or when the project is deployed to all remote servers. You can use the global Remote servers view to enable/disable servers for all projects configured with this option.

  • Select specific workspace servers for this project – Select or deselect remote servers in the table to enable them for the project. This project will be synchronized only with the selected servers. Note that enabling or disabling remote servers in the global Remote servers view has no effect on projects using this configuration.

As of JRebel 6.4.8, any previous project-specific settings will be automatically converted to configurable workspace servers.


4. Synchronize with the server

Use the syncbutton synchronization button on the toolbar to manually synchronize all configured projects between your workstation and server. To synchronize a single project, open the drop-down menu next to the button and select the desired project.

You can also right-click the desired project node in the Project Explorer and select JRebel > Synchronize from the context menu to synchronize. Your synchronization status is displayed in the console log.