Go to %TOMCAT_HOME%\bin
and create the file startup-jrebel.cmd
with the following contents:
@echo off set JAVA_OPTS=-javaagent:$AGENT_PATH_WIN %JAVA_OPTS% call "%~dp0\startup.bat" %*
You can also create a catalina-jrebel.cmd
with the following content:
@echo off set JAVA_OPTS=-javaagent:$AGENT_PATH_WIN %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:$AGENT_PATH_WIN
as shown on the following screenshot: