# Installation

JRebel installs a -javaagent that monitors the classes and resources in the workspace and propagates their changes to the running application. The following types of changes are supported:

- Changes to Java classes beyond what is supported by HotSwap (compare).
- Changes to framework configuration (e.g. Spring XML files and annotations, Struts mappings, etc).
- Any changes to static resources (e.g. JSPs, HTMLs, CSSs, XMLs, .properties, etc)

The installation instructions are specific to your environment. Please select your environment and press "Show instructions" to see or update the installation instructions.

Java version: | Java 5 or later | Java 1.4 | IBM JDK
Operating system: | Windows | Unix-like (Linux, Mac OS X, etc)
Platform: |
Tools: | Eclipse IntelliJ IDEA Maven

## Personalized Instructions

You're in luck! We have specific instructions made just for you:

1. Change your Maven `pom.xml(s)` using these instructions. When configuring the IDE there'll be no need to create a `rebel.xml` configuration file, as Maven plugin will do it automatically.
2. Use this step-by-step tutorial to configure Eclipse and your container.
3. Use this step-by-step tutorial to configure IntelliJ IDEA.
4. You'll need to create a `rebel.xml` configuration file in your application as described here. Note that if you're deploying your project directory directly to the application container there should be no need to create a rebel.xml configureation file as JRebel can pick up the changes from your workspace.
5. If you're running your server from the IDE there's nothing more you need to do. But if you're running it standalone or need to enable the JRebel agent manually, below are the instruction for your application container.

That's it! Enjoy! If you still have some questions you can take a look here:

- How to configure rebel.xml
- Configuration Reference Manual
- Configuring Maven plugin
- Eclipse & JRebel Generic Tutorial
- IntelliJ IDEA & JRebel tutorial

### Standalone Applications

Just run as usual adding the integration string:

    java -noverify -javaagent:jrebel.jar MAIN_CLASS ARGS

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

### Oracle Weblogic 9.x, 10.x

File: `%DOMAIN_HOME%\bin\startWeblogic.cmd`.
Add the following line in the beginning of the file:

    set JAVA_OPTIONS=-noverify -javaagent:jrebel.jar %JAVA_OPTIONS%

### Oracle Weblogic 9.x, 10.x

File: `$DOMAIN_HOME\bin\startWeblogic.sh`.
Add the following line in the beginning of the file:

    JAVA_OPTIONS="-noverify -javaagent:jrebel.jar $JAVA_OPTIONS"

### Oracle Application Server 10.x

File: `%ORACLE10_HOME%\bin\oc4j.cmd`

Add the following line:

    set JVMARGS=-noverify -javaagent:jrebel.jar %JVMARGS%

### Oracle Application Server 10.x

File: `$ORACLE10_HOME/bin/oc4j`

Add the following line:

    JVMARGS="-noverify -javaagent:jrebel.jar $JVMARGS"

### IBM WebSphere 6.1.x, 7.x

Generate the `jrebel-bootstrap.jar` by running `java -jar jrebel.jar` using the JVM you will run the application server with (you can also add this line to the `startServer.bat` after the environment is set).

Edit the file `server.xml` found in the server profile. Modify the tag `jvmEntries` and add the attribute `genericJvmArguments` with the value `-noverify -Xshareclasses:none -Xbootclasspath/p:/path/to/jrebel-bootstrap.jar;/path/to/jrebel.jar`

Note that as WebSphere does not support exploded development mode.

### IBM WebSphere 6.1.x, 7.x

Generate the `jrebel-bootstrap.jar` by running `java -jar jrebel.jar` using the JVM you will run the application server with (you can also add this line to the `startServer.sh` after the environment is set).

Edit the file `server.xml` found in the server profile. Modify the tag `jvmEntries` and add the attribute `genericJvmArguments` with the value `-noverify -Xshareclasses:none -Xbootclasspath/p:/path/to/jrebel-bootstrap.jar:/path/to/jrebel.jar`

Note that as WebSphere does not support exploded development mode.

### Oracle Application Server 9.x

Go to folder `%ORACLE9_HOME%\j2ee\home` and start the server with the following command:

    java -noverify -javaagent:jrebel.jar -jar oc4j.jar

### Oracle Application Server 9.x

Go to folder `$ORACLE9_HOME/j2ee/home` and start the server with the following command:

    java -noverify -javaagent:jrebel.jar -jar oc4j.jar

### JBoss 4.x, 5.x

File: `%JBOSS_HOME%\bin\run.bat`

Add the following line:

    set JAVA_OPTS=-noverify -javaagent:jrebel.jar %JAVA_OPTS%

### JBoss 4.x, 5.x

File: `$JBOSS_HOME/bin/run.sh`

Add the following line:

    JAVA_OPTS="-noverify -javaagent:jrebel.jar $JAVA_OPTS"

### GlassFish V2, V3

File: `%DOMAIN_HOME%\config\domain.xml`

Search for `jvm-options` element and add the elements `-Xverify:none` and `-javaagent:jrebel.jar` Start the domain as usual.

### Maven Jetty plugin (mvn jetty:run)

Edit your `pom.xml` file and set the `scanIntervalSeconds` param to 0, this will turn off Jetty's internal reloading. It should look something like this:

    <plugin>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty-maven-plugin</artifactId>
      <configuration>
        <scanIntervalSeconds>0</scanIntervalSeconds>
      </configuration>
    </plugin>

Start jetty with the maven jetty plugin and the `MAVEN_OPTS` parameter set to "-noverify -javaagent:/path/to/jrebel.jar". To do it in the console:

      > set MAVEN_OPTS="-noverify -javaagent:/path/to/jrebel.jar"
      > mvn jetty:run

### Maven Jetty plugin (mvn jetty:run)

Edit your `pom.xml` file and set the `scanIntervalSeconds` param to 0, this will turn off Jetty's internal reloading. It should look something like this:

    <plugin>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty-maven-plugin</artifactId>
      <configuration>
        <scanIntervalSeconds>0</scanIntervalSeconds>
      </configuration>
    </plugin>

Start jetty with the maven jetty plugin and the `MAVEN_OPTS` parameter set to "-noverify -javaagent:/path/to/jrebel.jar". To do it in the console:

    MAVEN_OPTS="-noverify -javaagent:/path/to/jrebel.jar" mvn jetty:run

### Tomcat 5.x, 6.x

File: `%TOMCAT_HOME%\bin\catalina.bat`

Add the following line:

    set JAVA_OPTS=-noverify -javaagent:jrebel.jar %JAVA_OPTS%

If you use the windows service or system tray startup use the following parameters instead:

    -Xverify:none -javaagent:jrebel.jar

### Tomcat 5.x, 6.x

File: `$TOMCAT_HOME/bin/catalina.sh`

Add the following line:

     JAVA_OPTS="-noverify -javaagent:jrebel.jar $JAVA_OPTS"

### Jetty 5.x, 6.x, 7.x

Since Jetty does not have any startup scripts just add the following line to the command line:

     -noverify -javaagent:jrebel.jar

### Google App Engine 1.x

File: `GAE_HOME/bin/dev_appserver.cmd`

Add the following line after `com.google.appengine.tools.KickStart`:

    --jvm_flag=-javaagent:jrebel.jar --jvm_flag=-noverify ^

### Google App Engine 1.x

File: `GAE_HOME/bin/dev_appserver.sh`

Add the following line after `com.google.appengine.tools.KickStart`:

    --jvm_flag=-javaagent:jrebel.jar --jvm_flag=-noverify \

### Caucho Resin 3.0.x

Copy jrebel.jar to RESIN_HOME/ folder.

Start httpd.exe with parameters

    httpd.exe -J-javaagent:jrebel.jar -J-noverify

### Caucho Resin 3.0.x

Copy jrebel.jar to RESIN_HOME/ folder.

Modify RESIN_HOME/bin/wrapper.pl $JAVA_ARGS variable to include the line:

    -javaagent:jrebel.jar -noverify

### Caucho Resin 3.1.x, 4.x

Copy jrebel.jar to RESIN_HOME/ folder.

To start Resin server with JRebel use the following command line:

    java -javaagent:jrebel.jar -noverify -jar lib\resin.jar

### Caucho Resin 3.1.x, 4.x

Copy jrebel.jar to RESIN_HOME/ folder.

Replace the last line of `RESIN_HOME/bin/httpd.sh` (or `resin.sh` in Resin 3.2+) with the following:

    exec $JAVA_EXE -javaagent:${RESIN_HOME}/jrebel.jar -noverify -jar ${RESIN_HOME}/lib/resin.jar $*

### SpringSource dm Server 1.x

Edit files "$PLATFORM_HOME/lib/java5-platform.profile" and "$PLATFORM_HOME/lib/java6-platform.profile". Add "com.zeroturnaround.*,\" and "org.zeroturnaround.*,\" to the property "org.osgi.framework.bootdelegation".

File: `%PLATFORM_HOME%\bin\startup.bat`

Add the following line:

    set JAVA_OPTS=-noverify -javaagent:jrebel.jar %JAVA_OPTS%

### SpringSource dm Platform 1.x

Edit files "$PLATFORM_HOME/lib/java5-platform.profile" and "$PLATFORM_HOME/lib/java6-platform.profile". Add "com.zeroturnaround.*,\" and "org.zeroturnaround.*,\" to the property "org.osgi.framework.bootdelegation".

File: `$PLATFORM_HOME/bin/startup.sh`

Add the following line:

     JAVA_OPTS="-noverify -javaagent:jrebel.jar $JAVA_OPTS"

### Other

If JRebel doesn't work with your application or container it is most probably due to some custom classloaders that don't behave exactly as we expect them to. You need to determine the class name of the classloader in question. The easiest way to do it is put the following line in any class that will be loaded by that classloader (e.g. in a web application case it could be a servlet class):

`System.out.println(getClass().getClassLoader().getClass().getName());`

This will print the name of the classloader class right out to the console. Let's assume the name was "com.acme.CustomClassLoader". In that case all we need to do is pass it to the JRebel agent like this:

`-noverify -javaagent:jrebel.jar=com.acme.CustomClassLoader`

Sometimes there could be several different custom classloaders and in such a case a comma-separated syntax should be used:

`-noverify -javaagent:jrebel.jar=com.acme.CustomClassLoader1,com.acme.CustomClassLoader2,...`

This should get most of the custom classloaders to work.

### Standalone Applications

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

Just run as usual adding the integration string:

    java -noverify -Xbootclasspath/p:jrebel-bootstrap.jar;jrebel.jar MAIN_CLASS ARGS

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

### Standalone Applications

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

Just run as usual adding the integration string:

    java -noverify -Xbootclasspath/p:jrebel-bootstrap.jar:jrebel.jar MAIN_CLASS ARGS

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

### Oracle Weblogic 7.x, 8.x

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

File: `%DOMAIN_HOME%\bin\startWeblogic.cmd`.
Add the following line:

    set JAVA_OPTIONS=-noverify -Xbootclasspath/p:jrebel-bootstrap.jar;jrebel.jar %JAVA_OPTIONS%

### Oracle Weblogic 7.x, 8.x

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

File: `$DOMAIN_HOME\bin\startWeblogic.sh`.
Add the following line:

    JAVA_OPTIONS="-noverify -Xbootclasspath/p:jrebel-bootstrap.jar:jrebel.jar $JAVA_OPTIONS"

### Oracle Application Server 10.x

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

File: `%ORACLE10_HOME%\bin\oc4j.cmd`

Add the following line:

    set JVMARGS=-noverify -Xbootclasspath/p:jrebel-bootstrap.jar;jrebel.jar %JVMARGS%

### Oracle Application Server 10.x

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

File: `$ORACLE10_HOME/bin/oc4j`

Add the following line:

    JVMARGS="-noverify -Xbootclasspath/p:jrebel-bootstrap.jar:jrebel.jar $JVMARGS"

### Oracle Application Server 9.x

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

Go to folder `%ORACLE9_HOME%\j2ee\home` and start the server with the following command:

    java -noverify -Xbootclasspath/p:jrebel-bootstrap.jar;jrebel.jar -jar oc4j.jar

### Oracle Application Server 9.x

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

Go to folder `$ORACLE9_HOME/j2ee/home` and start the server with the following command:

    java -noverify -Xbootclasspath/p:jrebel-bootstrap.jar:jrebel.jar -jar oc4j.jar

### JBoss 4.x, 5.x

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

File: `%JBOSS_HOME%\bin\run.bat`

Add the following line:

    set JAVA_OPTS=-noverify -Xbootclasspath/p:jrebel-bootstrap.jar;jrebel.jar %JAVA_OPTS%

### JBoss 4.x, 5.x

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

File: `$JBOSS_HOME/bin/run.sh`

Add the following line:

    JAVA_OPTS="-noverify -Xbootclasspath/p:jrebel-bootstrap.jar:jrebel.jar $JAVA_OPTS"

### Maven Jetty plugin (mvn jetty:run)

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

Edit your `pom.xml` file and set the `scanIntervalSeconds` param to 0, this will turn off Jetty's internal reloading. Jetty's internal reloading won't keep your session after reloading changed classes. Start jetty with the maven jetty plugin and the `MAVEN_OPTS` parameter set

    MAVEN_OPTS="-noverify -Xbootclasspath/p:jrebel-bootstrap.jar:jrebel.jar" mvn jetty:run

Run `mvn compile` in another terminal and JRebel will reload your changed classes.

### Tomcat 4.x, 5.x, 6.x

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

File: `%TOMCAT_HOME%\bin\catalina.cmd`

Add the following line:

    set JAVA_OPTS=-noverify -Xbootclasspath/p:jrebel-bootstrap.jar;jrebel.jar %JAVA_OPTS%

If you use the windows service or system tray startup use the following parameters instead:

    -Xverify:none -Xbootclasspath/p:jrebel-bootstrap.jar;jrebel.jar

### Tomcat 4.x, 5.x, 6.x

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

File: `$TOMCAT_HOME/bin/catalina.sh`

Add the following line:

     JAVA_OPTS="-noverify -Xbootclasspath/p:jrebel-bootstrap.jar:jrebel.jar $JAVA_OPTS"

### Jetty 5.x, 6.x, 7.x

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

Since Jetty does not have any startup scripts just add the following line to the command line:

    -noverify -Xbootclasspath/p:jrebel-bootstrap.jar;jrebel.jar

### Jetty 5.x, 6.x, 7.x

To generate the `jrebel-bootstrap.jar` just run `java -jar jrebel.jar` using the JVM you will run the application with.

Since Jetty does not have any startup scripts just add the following line to the command line:

    -noverify -Xbootclasspath/p:jrebel-bootstrap.jar:jrebel.jar

### Caucho Resin 3.0.x

Copy jrebel.jar to RESIN_HOME/ folder.

Start httpd.exe with parameters

    httpd.exe -J-noverify -J-Xbootclasspath/p:jrebel-bootstrap.jar;jrebel.jar

### Caucho Resin 3.0.x

Copy jrebel.jar to RESIN_HOME/ folder.

Modify RESIN_HOME/bin/wrapper.pl $JAVA_ARGS variable to include the line:

    -noverify -Xbootclasspath/p:jrebel-bootstrap.jar:jrebel.jar

### SAP NetWeaver 7.0.x

Use Configuration management console to add the following parameters to the JVM:

    -noverify -Xbootclasspath/p:jrebel-bootstrap.jar:jrebel.jar

### SAP NetWeaver 7.1.x

Use Configuration management console to add the following parameters to the JVM:

    -noverify -javaagent:jrebel.jar

### IBM WebSphere 6.0.x

Generate the `jrebel-bootstrap.jar` by running `java -jar jrebel.jar` using the JVM you will run the application server with (you can also add this line to the `startServer.bat` after the environment is set).

Edit the file `server.xml` found in the server profile. Modify the tag `jvmEntries` and add the attribute `genericJvmArguments` with the value `-noverify -Xshareclasses:none -Xbootclasspath/p:/path/to/jrebel-bootstrap.jar;/path/to/jrebel.jar`

Note that as WebSphere does not support exploded development mode.

### IBM WebSphere 6.0.x

Generate the `jrebel-bootstrap.jar` by running `java -jar jrebel.jar` using the JVM you will run the application server with (you can also add this line to the `startServer.sh` after the environment is set).

Edit the file `server.xml` found in the server profile. Modify the tag `jvmEntries` and add the attribute `genericJvmArguments` with the value `-noverify -Xshareclasses:none -Xbootclasspath/p:/path/to/jrebel-bootstrap.jar:/path/to/jrebel.jar`

Note that as WebSphere does not support exploded development mode.

### IBM WebSphere 6.0.x, 6.1.x, 7.x

Generate the `jrebel-bootstrap.jar` by running `java -jar jrebel.jar` using the JVM you will run the application server with (you can also add this line to the `startServer.sh` after the environment is set).

Edit the file `server.xml` found in the server profile. Modify the tag `jvmEntries` and add the attribute `genericJvmArguments` with the value `-noverify -Xshareclasses:none -Xbootclasspath/p:/path/to/jrebel-bootstrap.jar:/path/to/jrebel.jar`

Note that as WebSphere does not support exploded development mode.

### IBM WebSphere 6.0.x, 6.1.x, 7.x

Generate the `jrebel-bootstrap.jar` by running `java -jar jrebel.jar` using the JVM you will run the application server with (you can also add this line to the `startServer.bat` after the environment is set).

Edit the file `server.xml` found in the server profile. Modify the tag `jvmEntries` and add the attribute `genericJvmArguments` with the value `-noverify -Xshareclasses:none -Xbootclasspath/p:/path/to/jrebel-bootstrap.jar;/path/to/jrebel.jar`

Note that as WebSphere does not support exploded development mode.

### Other containers or applications using IBM JDK

Generate the `jrebel-bootstrap.jar` by running `java -jar jrebel.jar` using the JVM you will run the application server with.

Start your application with the extra java options `-noverify -Xshareclasses:none -Xbootclasspath/p:/path/to/jrebel-bootstrap.jar:/path/to/jrebel.jar`

### Other containers or applications using IBM JDK

Generate the `jrebel-bootstrap.jar` by running `java -jar jrebel.jar` using the JVM you will run the application server with.

Start your application with the extra java options `-noverify -Xshareclasses:none -Xbootclasspath/p:/path/to/jrebel-bootstrap.jar;/path/to/jrebel.jar`