©ZeroTurnaround OÜ, Estonia, Tartu
-javaagent:%REBEL_HOME%\jrebel.jar
to the JVM command line.java -jar %REBEL_HOME%\jrebel.jar
and then add the following to the command line:
-Xbootclasspath/p:%REBEL_HOME%\jrebel-bootstrap.jar;%REBEL_HOME%\jrebel.jar
WEB-INF/classes
or system classpath and changes will be picked up immediately on save. rebel.xml
configuration file. Automatic publishing should be disabled in the server configuration. Double click on your server name and a configuration page opens. Under the Publish section you should have the Never publish automatically option selected as shown in the following screenshot below. To start the server with JRebel enabled, check the corresponding checkbox (Enable JRebel agent) in JRebel Integration section.
If you run a standalone application you can enable JRebel for its launch configuration.
To start the server with JRebel enabled, check the corresponding checkbox (Enable JRebel agent) in JRebel settings section.
If you run a standalone application you can enable JRebel for its launch configuration.
This plugin introduces new launch buttons. One for starting the container with JRebel and the other for starting the container in debug mode with JRebel enabled.
This plugin introduces new launch buttons. One for starting the container with JRebel and the other for starting the container in debug mode with JRebel enabled.
Just run as usual adding the integration string:
java -javaagent:%REBEL_HOME%\jrebel.jar MAIN_CLASS ARGS
For instance:
java -javaagent:c:\JRebel\jrebel.jar foo.bar.MyServer
While developing IntelliJ IDEA or Eclipse plugins start the respected testing IDE instance with the integration string.
Just run as usual adding the integration string:
java -javaagent:$REBEL_HOME/jrebel.jar MAIN_CLASS ARGS
For instance:
java -javaagent:/opt/jrebel/jrebel.jar foo.bar.MyServer
While developing IntelliJ IDEA or Eclipse plugins start the respected testing IDE instance with the integration string.
Go to %GERONIMO_HOME%\bin
and create the file geronimo-jrebel.bat
with the following
contents:
@echo off set JAVA_OPTS=-javaagent:%REBEL_HOME%\jrebel.jar -Xms256m -Xmx512m -XX:MaxPermSize=256m %JAVA_OPTS% call "%~dp0\geronimo.bat" %*
Use this command file instead of geronimo.bat
if you want to run Geronimo with JRebel.
> geronimo.bat run
Go to $GERONIMO_HOME/bin
and create the file geronimo-jrebel.sh
with the following
contents:
#!/bin/bash export JAVA_OPTS="-javaagent:$REBEL_HOME/jrebel.jar -Xms256m -Xmx512m -XX:MaxPermSize=256m $JAVA_OPTS" `dirname $0`/geronimo.sh $@
Use this script instead of geronimo.sh
if you want to run Geronimo with JRebel.
> geronimo.sh run
File: %GAE_HOME%\bin\dev_appserver.cmd
Add the following line after com.google.appengine.tools.KickStart
:
--jvm_flag=-javaagent:%REBEL_HOME%\jrebel.jar ^
File: $GAE_HOME/bin/dev_appserver.sh
Add the following line after com.google.appengine.tools.KickStart
:
--jvm_flag=-javaagent:$REBEL_HOME/jrebel.jar \
Google Web Toolkit uses Apache Ant to start a web container, either Jetty or Tomcat, along with the GWT application. Thus, to enable JReble for GWT in development mode, one should set ANT_OPTS environment variable accordingly.
Go to the GWT project directory, and create run-jrebel.cmd
file with the following content:
@echo off set ANT_OPTS=-javaagent:%REBEL_HOME%\jrebel.jar ant devmode
Now use run-jrebel.cmd
to run your GWT application in development mode with JRebel enabled.
Google Web Toolkit uses Apache Ant to start a web container, either Jetty or Tomcat, along with the GWT application. Thus, to enable JReble for GWT in development mode, one should set ANT_OPTS environment variable accordingly.
Go to the GWT project directory, and create run-jrebel.sh
file with the following content:
#!/bin/bash export ANT_OPTS=-javaagent:$REBEL_HOME/jrebel.jar ant devmode
Now use run-jrebel.sh
to run your GWT application in development mode with JRebel enabled.
In the Administration Console open Configuration » JVM Settings » JVM Options
Use the Add JVM Option button to insert the following option:
-javaagent:%REBEL_HOME%\jrebel.jarPress Save and restart the server.
In the Administration Console open Configuration » JVM Settings » JVM Options
Use the Add JVM Option button to insert the following option:
-javaagent:$REBEL_HOME/jrebel.jar
Press Save and restart the server.
Go to %JBOSS_HOME%\bin
and create the file run-jrebel.cmd
with the following contents:
@echo off set JAVA_OPTS=-javaagent:%REBEL_HOME%\jrebel.jar -Xms256m -Xmx512m -XX:MaxPermSize=256m %JAVA_OPTS% call "%~dp0\run.bat" %*
Use this command file instead of run.bat
if you want to run JBoss with JRebel.
Go to $JBOSS_HOME/bin
and create the file run-jrebel.sh
with the following contents:
#!/bin/bash export JAVA_OPTS="-javaagent:$REBEL_HOME/jrebel.jar -Xms256m -Xmx512m -XX:MaxPermSize=256m $JAVA_OPTS" `dirname $0`/run.sh $@
Use this script instead of run.sh
if you want to run JBoss with JRebel.
Go to %JBOSS_HOME%\bin
and create the file standalone-jrebel.cmd
with the following contents:
@echo off set JAVA_OPTS=-javaagent:%REBEL_HOME%\jrebel.jar -Xms256m -Xmx512m -XX:MaxPermSize=256m %JAVA_OPTS% call "%~dp0\standalone.bat" %*
Use this command file instead of standalone.bat
if you want to run JBoss with JRebel.
Go to $JBOSS_HOME/bin
and create the file standalone-jrebel.sh
with the following contents:
#!/bin/bash export JAVA_OPTS="-javaagent:$REBEL_HOME/jrebel.jar -Xms256m -Xmx512m -XX:MaxPermSize=256m $JAVA_OPTS" `dirname $0`/standalone.sh $@
Use this script instead of standalone.sh
if you want to run JBoss with JRebel.
Since Jetty does not have any startup scripts for Windows just add the following line to the command line:
-javaagent:%REBEL_HOME%\jrebel.jar
The newer Jetty distributions (starting from 6.x) come with the bin/jetty.sh
script in the Jetty's installation directory.
Go to $JETTY_HOME/bin and create the file run-jrebel.sh with the following contents:
#!/bin/bash export JAVA_OPTS="-javaagent:$REBEL_HOME/jrebel.jar -Xms256m -Xmx512m -XX:MaxPermSize=256m $JAVA_OPTS" `dirname $0`/jetty.sh $@
Use this script instead of jetty.sh
if you want to run Jetty with JRebel.
Since Jetty does not have any startup scripts for Windows just add the following line to the command line:
-javaagent:%REBEL_HOME%\jrebel.jar
Go to $JETTY_HOME/bin and create the file jetty-jrebel.sh with the following contents:
#!/bin/bash export JAVA_OPTIONS="-javaagent:$REBEL_HOME/jrebel.jar -Xms256m -Xmx512m -XX:MaxPermSize=256m $JAVA_OPTIONS" `dirname $0`/jetty.sh $@
Use this script instead of jetty.sh
if you want to run Jetty with JRebel.
pom.xml
file and set the scanIntervalSeconds
param to 0
, this will
turn off Jetty's internal reloading. It should look like this:
<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <configuration> <scanIntervalSeconds>0</scanIntervalSeconds> </configuration> </plugin>
Add the following line to the MAVEN_OPTS environment variable:
-javaagent:%REBEL_HOME%\jrebel.jar
To do it in the console:
> set MAVEN_OPTS=-javaagent:%REBEL_HOME%\jrebel.jar %MAVEN_OPTS% > mvn jetty:run
pom.xml
file and set the scanIntervalSeconds
param to 0
, this will
turn off Jetty's internal reloading. It should look like this:
<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <configuration> <scanIntervalSeconds>0</scanIntervalSeconds> </configuration> </plugin>
Add the following line to the MAVEN_OPTS environment variable:
-javaagent:$REBEL_HOME/jrebel.jar
To do it in the console:
> export MAVEN_OPTS="-javaagent:$REBEL_HOME/jrebel.jar $MAVEN_OPTS" > mvn jetty:run
Go to %ORACLE10_HOME%\bin
and create the file run-oc4j.cmd
with the following contents:
set OC4J_JVM_ARGS=-javaagent:%REBEL_HOME%\jrebel.jar %OC4J_JVM_ARGS% call "%~dp0\oc4j.cmd" %*
Use this command file instead of oc4j.cmd
if you want to run OC4J with JRebel.
Go to $ORACLE10_HOME/bin
and create the file oc4j-jrebel.sh
with the following contents:
#!/bin/bash export OC4J_JVM_ARGS="-javaagent:$REBEL_HOME/jrebel.jar $OC4J_JVM_ARGS" `dirname $0`/oc4j $@
Use this script instead of oc4j
if you want to run OC4J with JRebel.
Go to folder %ORACLE9_HOME%\j2ee\home
and start the
server with the following command:
java -javaagent:%REBEL_HOME%\jrebel.jar -jar oc4j.jar
Go to folder $ORACLE9_HOME/j2ee/home
and start the
server with the following command:
java -javaagent:$REBEL_HOME/jrebel.jar -jar oc4j.jar
To start Resin server with JRebel from %RESIN_HOME% use the following command line:
java -javaagent:%REBEL_HOME%\jrebel.jar -jar lib\resin.jar
Replace the last line of $RESIN_HOME/bin/httpd.sh
(or resin.sh
in Resin 3.2+) with the following:
exec $JAVA_EXE -javaagent:$REBEL_HOME/jrebel.jar -jar $RESIN_HOME/lib/resin.jar $*
Start httpd.exe with parameters
httpd.exe -J-javaagent:%REBEL_HOME%\jrebel.jar
Modify $RESIN_HOME/bin/wrapper.pl $JAVA_ARGS variable to include the line:
-javaagent:$REBEL_HOME/jrebel.jar
Use Configuration management console to add the following parameters to the JVM:
-javaagent:%REBEL_HOME%\jrebel.jar
Use Configuration management console to add the following parameters to the JVM:
-javaagent:$REBEL_HOME/jrebel.jar
File: %PLATFORM_HOME%\bin\startup.bat
Add the following line:
set JAVA_OPTS=-javaagent:%REBEL_HOME%\jrebel.jar %JAVA_OPTS%
File: $PLATFORM_HOME/bin/startup.sh
Add the following line:
JAVA_OPTS="-javaagent:$REBEL_HOME/jrebel.jar $JAVA_OPTS"
Go to %SPRING_TC_HOME%
, choose the Tomcat instance (%CATALINA_BASE%) you would like to run.
Open the %CATALINA_BASE%\conf\wrapper.conf
configuration file for editing.
In the Java Additional Parameters section, add the additional wrapper.java.additional.*
properties:
wrapper.java.additional.10=-javaagent:%REBEL_HOME%\jrebel.jar
Use the %SPRING_TC_HOME%\tcruntime-ctl.bat
script to start Tomcat instances as usual.
Go to $SPRING_TC_HOME
, choose the Tomcat instance ($CATALINA_BASE) you would like to run.
Open the $CATALINA_BASE/conf/wrapper.conf
configuration file for editing.
In the Java Additional Parameters section, add the additional wrapper.java.additional.*
properties:
wrapper.java.additional.10=-javaagent:$REBEL_HOME/jrebel.jar
Use the $SPRING_TC_HOME/tcruntime-ctl.bat
script to start Tomcat instances as usual.
Go to %TOMCAT_HOME%\bin
and create the file startup-jrebel.cmd
with the following contents:
@echo off set JAVA_OPTS=-javaagent:%REBEL_HOME%\jrebel.jar %JAVA_OPTS% call "%~dp0\startup.bat" %*
You can also create a catalina-jrebel.cmd
with the following content:
@echo off set JAVA_OPTS=-javaagent:%REBEL_HOME%\jrebel.jar %JAVA_OPTS% call "%~dp0\catalina.bat" %*
Use those command files instead of startup.bat
and catalina.bat
if you want to run Tomcat with JRebel.
If you're running Tomcat as a service please open the tomcatXw.exe
wrapper (or double click the Tomcat icon in the system tray) and insert the following line into the Java » Java Options textbox:
-javaagent:%REBEL_HOME%\jrebel.jar
as shown on the following screenshot:
Go to $TOMCAT_HOME/bin
and create the file startup-jrebel.sh
with the following contents:
#!/bin/bash export JAVA_OPTS="-javaagent:$REBEL_HOME/jrebel.jar $JAVA_OPTS" `dirname $0`/startup.sh $@
You can also create a catalina-jrebel.sh
with the following content:
#!/bin/bash export JAVA_OPTS="-javaagent:$REBEL_HOME/jrebel.jar $JAVA_OPTS" `dirname $0`/catalina.sh $@
Make them executable and use those scripts instead of startup.sh
and catalina.sh
if you want to run Tomcat with JRebel.
Go to %TCAT_HOME%\bin
and create the file startup-jrebel.cmd
with the following contents:
@echo off set JAVA_OPTS=-javaagent:%REBEL_HOME%\jrebel.jar %JAVA_OPTS% call "%~dp0\startup.bat" %*
You can also create a catalina-jrebel.cmd
with the following content:
@echo off set JAVA_OPTS=-javaagent:%REBEL_HOME%\jrebel.jar %JAVA_OPTS% call "%~dp0\catalina.bat" %*
Use those command files instead of startup.bat
and catalina.bat
if you want to run TCat with JRebel.
If you're running TCat as a service please open the TcatServerw.exe
wrapper (or double click the TCat icon in the system tray) and insert the following line into the Java » Java Options textbox:
-javaagent:%REBEL_HOME%\jrebel.jar
as shown on the following screenshot:
Go to $TCAT_HOME/bin
and create the file startup-jrebel.sh
with the following contents:
#!/bin/bash export JAVA_OPTS="-javaagent:$REBEL_HOME/jrebel.jar $JAVA_OPTS" `dirname $0`/startup.sh $@
You can also create a catalina-jrebel.sh
with the following content:
#!/bin/bash export JAVA_OPTS="-javaagent:$REBEL_HOME/jrebel.jar $JAVA_OPTS" `dirname $0`/catalina.sh $@
Make them executable and use those scripts instead of startup.sh
and catalina.sh
if you want to run TCat with JRebel.
Go to %DOMAIN_HOME%\bin
and create the file startWeblogic-jrebel.cmd
with the following contents:
@echo off set JAVA_OPTIONS=-javaagent:%REBEL_HOME%\jrebel.jar %JAVA_OPTIONS% call "%~dp0\startWebLogic.cmd" %*
Use this command file instead of startWeblogic.cmd
if you want to run Weblogic with JRebel.
Go to $DOMAIN_HOME/bin
and create the file startWeblogic-jrebel.sh
with the following contents:
#!/bin/bash export JAVA_OPTIONS="-javaagent:$REBEL_HOME/jrebel.jar $JAVA_OPTIONS" `dirname $0`/startWebLogic.sh $@
Use this script instead of startWeblogic.sh
if you want to run Weblogic with JRebel.
Go to %WEBSPHERE_CE_HOME%\bin
and create the file startup-jrebel.bat
with the following
contents:
@echo off set JAVA_OPTS=-javaagent:%REBEL_HOME%\jrebel.jar call "%~dp0\startup.bat" %*
Use this command file instead of startup.bat
if you want to run WebSphere CE with JRebel.
Go to $WEBSPHERE_CE_HOME/bin
and create the file startup-jrebel.sh
with the following
contents:
#!/bin/bash export JAVA_OPTS="-javaagent:$REBEL_HOME/jrebel.jar" `dirname $0`/startup.sh $@
Use this script instead of startup.sh
if you want to run WebSphere CE with JRebel.
If JRebel doesn't work with your application or container it is most probably due to some custom classloaders that don't behave 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:
-javaagent:%REBEL_HOME%\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:
-javaagent:%REBEL_HOME%\jrebel.jar=com.acme.CustomClassLoader1,com.acme.CustomClassLoader2,...
This should get most of the custom classloaders to work.
If JRebel doesn't work with your application or container it is most probably due to some custom classloaders that don't behave 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:
-javaagent:$REBEL_HOME/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:
-javaagent:$REBEL_HOME/jrebel.jar=com.acme.CustomClassLoader1,com.acme.CustomClassLoader2,...
This should get most of the custom classloaders to work.
Run java -jar %REBEL_HOME%\jrebel.jar
to generate the jrebel-bootstrap.jar
using the JVM you will run the application with.
Add this arguments to the JVM command line:
java -noverify -Xbootclasspath/p:%REBEL_HOME%\jrebel-bootstrap.jar;%REBEL_HOME%\jrebel.jar MAIN_CLASS ARGS
Run java -jar $REBEL_HOME/jrebel.jar
to generate the jrebel-bootstrap.jar
using the JVM you will run the application with.
Add this arguments to the JVM command line:
java -noverify -Xbootclasspath/p:$REBEL_HOME/jrebel-bootstrap.jar;$REBEL_HOME/jrebel.jar MAIN_CLASS ARGS
Go to %JBOSS_HOME%\bin
and create the file run-jrebel.cmd
with the following contents:
@echo off set JREBEL_BOOTSTRAP="%~dp0\jrebel-bootstrap.jar" java -Drebel.bootstrap=%JREBEL_BOOTSTRAP% -jar %REBEL_HOME%\jrebel.jar set JAVA_OPTS=-noverify -Xbootclasspath/p:%JREBEL_BOOTSTRAP%;%REBEL_HOME%\jrebel.jar %JAVA_OPTS% call "%~dp0\run.bat" %*
Use this command file instead of run.bat
if you want to run JBoss with JRebel.
Go to $JBOSS_HOME/bin
and create the file run-jrebel.sh
with the following contents:
#!/bin/bash JREBEL_BOOTSTRAP=`dirname $0`/jrebel-bootstrap.jar java -Drebel.bootstrap=$JREBEL_BOOTSTRAP -jar $REBEL_HOME/jrebel.jar export JAVA_OPTS="-noverify -Xbootclasspath/p:$JREBEL_BOOTSTRAP:$REBEL_HOME/jrebel.jar $JAVA_OPTS" `dirname $0`/run.sh $@
Use this script instead of run.sh
if you want to run JBoss with JRebel.
Run java -jar %REBEL_HOME%\jrebel.jar
to generate the jrebel-bootstrap.jar
using the JVM you will run the application with.
Add the following line to the JVM command line:
-noverify -Xbootclasspath/p:%REBEL_HOME%\jrebel-bootstrap.jar;%REBEL_HOME%\jrebel.jar
Run java -jar $REBEL_HOME/jrebel.jar
to generate the jrebel-bootstrap.jar
using the JVM you will run the application with.
Add the following line to the JVM command line:
-noverify -Xbootclasspath/p:$REBEL_HOME/jrebel-bootstrap.jar;$REBEL_HOME/jrebel.jar
pom.xml
file and set the scanIntervalSeconds
param to 0
, this will
turn off Jetty's internal reloading. It should look like this:
<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <configuration> <scanIntervalSeconds>0</scanIntervalSeconds> </configuration> </plugin>
Run java -jar %REBEL_HOME%\jrebel.jar
to generate the jrebel-bootstrap.jar
using the JVM you will run the application with.
Add the following line to the MAVEN_OPTS environment variable:
-noverify -Xbootclasspath/p:%REBEL_HOME%\jrebel-bootstrap.jar;%REBEL_HOME%\jrebel.jar
To do it in the console:
> java -jar %REBEL_HOME%\jrebel.jar > set MAVEN_OPTS=-noverify -Xbootclasspath/p:%REBEL_HOME%\jrebel-bootstrap.jar;%REBEL_HOME%\jrebel.jar %MAVEN_OPTS% > mvn jetty:run
pom.xml
file and set the scanIntervalSeconds
param to 0
, this will
turn off Jetty's internal reloading. It should look like this:
<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <configuration> <scanIntervalSeconds>0</scanIntervalSeconds> </configuration> </plugin>
Run java -jar $REBEL_HOME/jrebel.jar
to generate the jrebel-bootstrap.jar
using the JVM you will run the application with.
Add the following line to the MAVEN_OPTS environment variable:
-noverify -Xbootclasspath/p:$REBEL_HOME/jrebel-bootstrap.jar:$REBEL_HOME/jrebel.jar
To do it in the console:
> java -jar $REBEL_HOME/jrebel.jar > export MAVEN_OPTS="-noverify -Xbootclasspath/p:$REBEL_HOME/jrebel-bootstrap.jar:$REBEL_HOME/jrebel.jar $MAVEN_OPTS" > mvn jetty:run
Go to %ORACLE10_HOME%\bin
and create the file oc4j-jrebel.cmd
with the following contents:
set JREBEL_BOOTSTRAP="%~dp0\jrebel-bootstrap.jar" java -Drebel.bootstrap=%JREBEL_BOOTSTRAP% -jar %REBEL_HOME%\jrebel.jar set OC4J_JVM_ARGS=-noverify -Xbootclasspath/p:%JREBEL_BOOTSTRAP%;%REBEL_HOME%\jrebel.jar %OC4J_JVM_ARGS% call "%~dp0\oc4j.cmd" %*
Use this command file instead of oc4j.cmd
if you want to run OC4J with JRebel.
Go to $ORACLE10_HOME/bin
and create the file oc4j-jrebel.sh
with the following contents:
#!/bin/bash JREBEL_BOOTSTRAP=`dirname $0`/jrebel-bootstrap.jar java -Drebel.bootstrap=$JREBEL_BOOTSTRAP -jar $REBEL_HOME/jrebel.jar export OC4J_JVM_ARGS="-noverify -Xbootclasspath/p:$JREBEL_BOOTSTRAP:$REBEL_HOME/jrebel.jar $OC4J_JVM_ARGS" `dirname $0`/oc4j $@
Make it executable and use this script instead of oc4j.sh
if you want to run OC4J with JRebel.
Run java -jar %REBEL_HOME%\jrebel.jar
to generate the jrebel-bootstrap.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:%REBEL_HOME%\jrebel-bootstrap.jar;%REBEL_HOME%\jrebel.jar -jar oc4j.jar
Run java -jar $REBEL_HOME/jrebel.jar
to generate the jrebel-bootstrap.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:$REBEL_HOME/jrebel-bootstrap.jar:$REBEL_HOME/jrebel.jar -jar oc4j.jar
Run java -jar %REBEL_HOME%\jrebel.jar
to generate the jrebel-bootstrap.jar
using the JVM you will run the application with.
Start httpd.exe with parameters
httpd.exe -J-noverify -J-Xbootclasspath/p:%REBEL_HOME%\jrebel-bootstrap.jar;%REBEL_HOME%\jrebel.jar
Run java -jar $REBEL_HOME/jrebel.jar
to generate the jrebel-bootstrap.jar
using the JVM you will run the application with.
Modify RESIN_HOME/bin/wrapper.pl $JAVA_ARGS variable to include the line:
-noverify -Xbootclasspath/p:$REBEL_HOME/jrebel-bootstrap.jar:$REBEL_HOME/jrebel.jar
Run java -jar %REBEL_HOME%\jrebel.jar
to generate the jrebel-bootstrap.jar
using the JVM you will run the application with.
Use Configuration management console to add the following parameters to the JVM:
-noverify -Xbootclasspath/p:%REBEL_HOME%\jrebel-bootstrap.jar:%REBEL_HOME%\jrebel.jar
Run java -jar $REBEL_HOME/jrebel.jar
to generate the jrebel-bootstrap.jar
using the JVM you will run the application with.
Use Configuration management console to add the following parameters to the JVM:
-noverify -Xbootclasspath/p:$REBEL_HOME/jrebel-bootstrap.jar:$REBEL_HOME/jrebel.jar
Go to %TOMCAT_HOME%\bin
and create the file startup-jrebel.cmd
with the following contents:
@echo off set JREBEL_BOOTSTRAP="%~dp0\jrebel-bootstrap.jar" java -Drebel.bootstrap=%JREBEL_BOOTSTRAP% -jar %REBEL_HOME%\jrebel.jar set JAVA_OPTS=-noverify -Xbootclasspath/p:%JREBEL_BOOTSTRAP%;%REBEL_HOME%\jrebel.jar %JAVA_OPTS% call "%~dp0\startup.bat" %*
You can also create a catalina-jrebel.cmd
with the following content:
@echo off set JREBEL_BOOTSTRAP="%~dp0\jrebel-bootstrap.jar" java -Drebel.bootstrap=%JREBEL_BOOTSTRAP% -jar %REBEL_HOME%\jrebel.jar set JAVA_OPTS=-noverify -Xbootclasspath/p:%JREBEL_BOOTSTRAP%;%REBEL_HOME%\jrebel.jar %JAVA_OPTS% call "%~dp0\catalina.bat" %*
Use those command files instead of startup.bat
and catalina.bat
if you want to run Tomcat with JRebel.
If you're running Tomcat as a Windows service then first generate the jrebel-bootstrap.jar
by running java -jar %REBEL_HOME%\jrebel.jar
using the JVM you will run the application with.
Then open the tomcatXw.exe
wrapper (or double click the Tomcat icon in the system tray) and insert the following line into the Java » Java Options textbox:
-noverify -Xbootclasspath/p:%REBEL_HOME%\jrebel-bootstrap.jar;%REBEL_HOME%\jrebel.jar
as shown on the following screenshot:
Go to $TOMCAT_HOME/bin
and create the file startup-jrebel.sh
with the following contents:
#!/bin/bash JREBEL_BOOTSTRAP=`dirname $0`/jrebel-bootstrap.jar java -Drebel.bootstrap=$JREBEL_BOOTSTRAP -jar $REBEL_HOME/jrebel.jar export JAVA_OPTS="-noverify -Xbootclasspath/p:$JREBEL_BOOTSTRAP:$REBEL_HOME/jrebel.jar $JAVA_OPTS" `dirname $0`/startup.sh $@
You can also create a catalina-jrebel.sh
with the following content:
#!/bin/bash JREBEL_BOOTSTRAP=`dirname $0`/jrebel-bootstrap.jar java -Drebel.bootstrap=$JREBEL_BOOTSTRAP -jar $REBEL_HOME/jrebel.jar export JAVA_OPTS="-noverify -Xbootclasspath/p:$JREBEL_BOOTSTRAP:$REBEL_HOME/jrebel.jar $JAVA_OPTS" `dirname $0`/catalina.sh $@
Make them executable and use those scripts instead of startup.sh
and catalina.sh
if you want to run Tomcat with JRebel.
Go to %DOMAIN_HOME%
and create the file startWebLogic-jrebel.cmd
with the following contents:
@echo off call setEnv.cmd set JREBEL_BOOTSTRAP="%~dp0\jrebel-bootstrap.jar" java -Drebel.bootstrap=%JREBEL_BOOTSTRAP% -jar %REBEL_HOME%\jrebel.jar set JAVA_OPTIONS=-noverify -Xbootclasspath/p:%JREBEL_BOOTSTRAP%;%REBEL_HOME%\jrebel.jar %JAVA_OPTIONS% call "%~dp0\startWebLogic.cmd" %*
Use this command file instead of startWebLogic.cmd
if you want to run Weblogic with JRebel.
Go to $DOMAIN_HOME
and create the file startWebLogic-jrebel.sh
with the following contents:
#!/bin/bash `dirname $0`/setEnv.sh JREBEL_BOOTSTRAP=`dirname $0`/jrebel-bootstrap.jar java -Drebel.bootstrap=$JREBEL_BOOTSTRAP -jar $REBEL_HOME/jrebel.jar export JAVA_OPTIONS="-noverify -Xbootclasspath/p:$JREBEL_BOOTSTRAP:$REBEL_HOME/jrebel.jar $JAVA_OPTIONS" `dirname $0`/startWebLogic.sh $@
Use this script instead of startWebLogic.sh
if you want to run Weblogic with JRebel.
Generate the jrebel-bootstrap.jar
by running java
-jar %REBEL_HOME%\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).
Start the IBM WebSphere server and run the Administrative Console.
In the Administration Console open Servers » Application Servers and select the server your app is deployed to.
Select Java and Process Management» Process Definition.
Select Java Virtual Machine.
Insert the following line into Generic JVM arguments for Websphere 6.1 or later running on IBM JDK 5 or later:
-noverify -Xshareclasses:none -Xbootclasspath/p:%REBEL_HOME%\jrebel-bootstrap.jar;%REBEL_HOME%\jrebel.jar
Insert the following line into Generic JVM arguments for Websphere 6.0 or later running on IBM JDK 1.4:
-noverify -Xbootclasspath/p:%REBEL_HOME%\jrebel-bootstrap.jar;%REBEL_HOME%\jrebel.jar
Press OK, when asked, Save the master configuration and restart the server.
Generate the jrebel-bootstrap.jar
by running java
-jar $REBEL_HOME/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).
Start the IBM WebSphere server and run the Administrative Console.
In the Administration Console open Servers » Application Servers and select the server your app is deployed to.
Select Java and Process Management» Process Definition.
Select Java Virtual Machine.
Insert the following line into Generic JVM arguments for Websphere 6.1 or later running on IBM JDK 5 or later:
-noverify -Xshareclasses:none -Xbootclasspath/p:$REBEL_HOME/jrebel-bootstrap.jar:$REBEL_HOME/jrebel.jar
Insert the following line into Generic JVM arguments for Websphere 6.0 or later running on IBM JDK 1.4:
-noverify -Xbootclasspath/p:$REBEL_HOME/jrebel-bootstrap.jar:$REBEL_HOME/jrebel.jar
Press OK, when asked, Save the master configuration and restart the server.
Generate the jrebel-bootstrap.jar
by running java
-jar %REBEL_HOME%\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:%REBEL_HOME%\jrebel-bootstrap.jar;%REBEL_HOME%\jrebel.jar
Generate the jrebel-bootstrap.jar
by running java
-jar $REBEL_HOME/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:$REBEL_HOME/jrebel-bootstrap.jar:$REBEL_HOME/jrebel.jar
JRebel Reference Manual, ©ZeroTurnaround OÜ, Estonia, Tartu