JRebel for Cloud in IntelliJ IDEA¶
This section lists the steps required to set up JRebel for Cloud on IntelliJ IDEA. You need a working, activated JRebel installation in your IDE. Please follow the instructions on how to install and configure JRebel for IntelliJ IDEA. If you have already set up JRebel, move on to step 1.
Important
JRebel Remoting does not support multiple developers syncing to the same module on a shared remote server. After each sync, the remote server’s code state for that module is replaced entirely by the workspace of the developer who performed the sync. Changes from any previous developers’ syncs are discarded.
Recommendation:
Assign one developer per module for remote sync. If a team owns a module, only one team member should sync it at a time.
Teams sharing a remote server across multiple modules should keep their modules backward-compatible and communicate breaking changes between module owners.
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:
Open Settings > JRebel > Startup.
Select Run on a remote server.
Add the
-Drebel.remoting_plugin=trueattribute to the server startup parameters.Use the drop-down menus to specify your remote server configuration and follow the instructions.
The following 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
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 remote server to IntelliJ IDEA¶
Important
A JRebel Remoting sync operation targets a single remote server (JVM) at a time. There is no built-in mechanism to broadcast or fan out a single sync to multiple JVMs simultaneously.
Recommendation (for clustered or Kubernetes environments):
Configure one remote server entry per JVM (pod) in your IDE plugin. Each entry should point to a stable, dedicated endpoint. For example, one Kubernetes Service per pod, with a fixed hostname and port.
These entries can be configured at the workspace level. No project- or module-level configuration is required, unless you need to control which modules sync to which servers.
When Synchronize on build is enabled, each build will sync to all configured remote servers, effectively achieving fan-out.
Do not rely on a TCP load balancer to distribute sync requests across backend JVMs. A load balancer will route each sync to only one backend instance, meaning the other instances will not receive the update. Direct, pinned connectivity to each JVM is required.
Important
JRebel Remoting requires direct, pinned connectivity to each target JVM.
Placing a TCP load balancer between the IDE and your backend JVMs is not supported, regardless of whether sticky sessions or session affinity are enabled. A load balancer will route each sync request to only one backend instance. The other instances behind the LB will not receive the code update. There is no mechanism for a standard load balancer to propagate sync requests to all backend instances and merge their responses.
Recommendation (for clustered or Kubernetes environments):
Create one stable endpoint per JVM. For example, one Kubernetes Service per pod (managed server), each with a fixed hostname and port.
Configure each endpoint as a separate, remote server entry in the IDE plugin.
Do not point the IDE at a cluster-level or load-balanced endpoint.
Open Settings > JRebel > Remote servers. You will be presented with the following view:
Press + to configure a new remote server. The following dialog will open:
Provide the required remote server information:
Server URL – Provide the full URL for the server.
You can specify optional information and configure security settings for the remote server:
Server name – Give your server a recognizable title. This will be used to refer to this server in other JRebel dialogs.
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.
Press OK to store the new remote server.
This server can now be used by all modules in IntelliJ IDEA. Note that multiple remote servers can be added and used simultaneously. Deselecting an existing remote server in the Remote servers view will exclude it from synchronization.
Note
Select Synchronize on build in Settings > JRebel > Remote servers to automatically synchronize changes with remote servers when compiling.
3.Configure modules for remote server support¶
Open View > Tool Windows > JRebel. The JRebel Modules view is opened in IntelliJ IDEA:
Select the
checkbox for your desired modules.Note
The configuration file
rebel-remote.xmlis created in the project resources folder.Build and redeploy your application containing the
rebel-remote.xmlconfiguration file to the remote server.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 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.
4. Synchronize with the server¶
Use the
synchronization button on the JRebel Modules tool window to manually synchronize your workstation and remote servers.