We'll see how to install and activate JRebel on a Tomcat standalone server.
The following are the steps that describe how to activate JRebel on a Tomcat server:
Download and unzip the Tomcat server.
Launch Tomcat with the startup script located in its
bin
directory (bin\startup.bat
on MS Windows).Enable the JRebel Java Agent for the Tomcat server. To proceed, simply append
-javaagent:C:\packtpub\jrebel\jrebel.jar
to theJAVA_OPTS
environment variable.
To proceed, you will need the latest version of Tomcat 6 or Tomcat 7, a Java 6 (or Java 7) JRE or JDK, and a trial (or commercial) activated license. Free licenses don't allow you to run JRebel on standalone servers!
Once installed and configured, add the JRebel Java Agent to the startup parameters of Tomcat.
Tomcat is now configured to launch the JRebel Java Agent.
Launch Tomcat with the startup script and look at the console output or Tomcat logs. If JRebel is correctly launched, you will see messages that indicate your JRebel license is active. Otherwise, you have probably forgotten to register your license, or you have misspelled the JRebel Java Agent path.
The following is an example of the normal JRebel activation, with message displayed in Tomcat's default output:
JRebel: JRebel 5.3.1 (201307011846)
JRebel: (c) Copyright ZeroTurnaround OU, Estonia, Tartu.
JRebel:
JRebel: Over the last 1 days JRebel prevented
JRebel: at least 0 redeploys/restarts saving you about 0 hours.
JRebel:
JRebel: You are running with an evaluation license.
JRebel: You have 14 days until the license expires.
JRebel:
JRebel: You will see this notification until you obtain a
JRebel: full license for your installation.
Please note that Tomcat will display timestamps in its default output and logs. They have been removed from this example for visibility purposes.