Setting up the JRebel Agent¶
Add the JRebel Agent to your application’s JVM and configure it so that it can connect to the broker for licensing and remoting.
Add JRebel Agent to your JVM¶
Download JRebel from https://www.jrebel.com/jrebel-releases.
Extract the JRebel Agent archive (for example,
jrebel64.dll
on Windows).Copy the JRebel Agent archive to the folder that you will use to generate the Docker image.
To add the
-agentpath
JVM flag to your application’s startup command, runjava -agentpath:/<path/to/jrebel/library>
and replace<path/to/jrebel/library>
with the path to your JRebel Agent library (for example,<path/to/jrebel/library/jrebel64.dll>
on Windows).
Add Broker details¶
Add the required -Drebel.broker.url
and -Drebel.broker.token
JVM system properties and any optional properties you desire to your application’s startup command. For reference, an example is shown below.
-agentpath:/jrebel/lib/libjrebelaarch64.so
-Drebel.broker.url=<http://host.docker.internal:7001>/zone/<staging> # (Required) Broker URL. Replace <http://host.docker.internal:7001> with your Broker's public URL and port. Replace <staging> with the zone name that you want to connect to.
-Drebel.broker.token=<staging-token> # (Required) Broker zone. Replace <staging-token> with the corresponding token defined for that zone in your brokerconfig.yml file.
-Drebel.broker.jvm.name=my-app # (Optional) Override the default JVM name in the Broker UI.
-Drebel.broker.cert.file=/path/to/cert.pem # (Optional) Specify the Broker's HTTPS certificate file.
-Drebel.broker.cert.fingerprint=a3727f... # (Optional) Specify the Broker's HTTPS certificate fingerprint for verification.
-Drebel.broker.cert.verify=false # (Optional) Deactivate HTTPS certificate verification. Only use for testing purposes in insecure environments.