Switching JRebel Agents

JRebel comes bundled with two agents – a native agent for supported platforms and a java agent for other platforms.


Switching JRebel to Native Agent on Windows, Mac OS and Linux (x86)

Add -agentpath:[path/to/jrebel] to the JVM command line.

Operating system

Startup command

Windows 64-bit JDK

java -agentpath:c:\JRebel\lib\jrebel64.dll com.example.Main

Windows 32-bit JDK

java -agentpath:c:\JRebel\lib\jrebel32.dll com.example.Main

Mac OS X 64-bit JDK

java -agentpath:/Users/user/jrebel/lib/libjrebel64.dylib com.example.Main

Mac OS X 32-bit JDK

java -agentpath:/Users/user/jrebel/lib/libjrebel32.dylib com.example.Main

Linux 64-bit JDK

java -agentpath:/Users/user/jrebel/lib/libjrebel64.so com.example.Main

Linux 32-bit JDK

java -agentpath:/Users/user/jrebel/lib/libjrebel32.so com.example.Main


Switching JRebel to Java Agent on all operating systems and architectures

Java 6 to 8:

java -javaagent:[/path/to/]jrebel.jar -Xbootclasspath/p:[/path/to/]rebelboot.jar [... rest of arguments ...]

Java 9 and newer:

REBELBOOT=/path/to/rebelboot
mkdir -p $REBELBOOT
touch $REBELBOOT/patches.txt
java -javaagent:[/path/to/]jrebel.jar -Drebel.bootstrap=$REBELBOOT @$REBELBOOT/patches.txt [... rest of arguments ...]