Installation

On Java 5 or later just add the following to JVM command line (note that it is important that the JAR would be named "javarebel.jar")

-noverify -javaagent:/path/to/javarebel.jar

On Java 1.4 first run the following:

java -jar /path/to/javarebel.jar

This will generate an javarebel-bootstrap.jar in the same directory as javarebel.jar and then add the following to JVM command line

-noverify -Xbootclasspath/p:/path/to/javarebel-bootstrap.jar;/path/to/javarebel.jar

NB! The javarebel-bootstrap.jar is specific to the JVM version and JavaRebel version so be sure to regenerate every time the JVM or JavaRebel version changes! Also make sure that the JVM version you generate with is the same your application will run with! We suggest to add bootstrap generation command to the application/server startup script if possible.

With any Java version if you use an IDE that compiles classes on-the-fly set -Drebel.dirs property to point to the output folder, for example:

-Drebel.dirs=/home/user/workspace/project/bin

Start the server or application as usual. If JavaRebel integration was successful you should see a message like this:

##########################################################
# ZeroTurnaround JavaRebel x.y.z                         #
# ...                                                    #
##########################################################

See Features for supported JVM and server versions.

Configuration

The following classes will be reloaded

  1. All ".class" classes inside the usual classpath (WEB-INF/classes, etc). Using this with exploded deployment will provide the best JavaRebel experience.
  2. All ".class" classes in directories specified "-Drebel.dirs" comma-separated list JVM command line property. With this you can deploy in unexploded development mode (EAR or WAR) and still reload classes instantly. For example -Drebel.dirs=/path/to/eclipse/project-one/bin,/path/to/eclipse/project-two/bin. However new classes (or renamed old classes) will not be loaded before they also appear in the classpath (e.g. after the build in JAR files).

If you are using IDEA you should install this plugin to enable debugging with JavaRebel. You might also want to configure your IDE for better debugging experience.

If you have any problems with dynamic proxies (JDK, CgLib, Javassist) add "-Drebel.forbid_bypass=true" to the JVM command line to improve compatibility.

Platform-specific

Further you can find specific instructions for different operating systems, application servers and so on.

Choose platform

Standalone Applications

Just run as usual adding the integration string:

java -noverify -javaagent:javarebel.jar MAIN_CLASS ARGS

While developing IntelliJ IDEA or Eclipse plugins start the respected testing IDE instance with the integration string.