- Install JRebel, the latest version for your platform.
- Get into Eclipse and install the JRebel Eclipse Plugin using the "Install New Software..." link under the Help menu, and add the JRebel Update site...
http://www.zeroturnaround.com/update-site
I specified the "JRebel Eclipse Debugger Integration" and "JRebel Eclipse Integration only" components.
- Specified the jrebel.jar in Eclipse / JRebel preferences. (Mine was in my C:\Program Files\ZeroTurnaround\JRebel\jrebel.jar folder.
- The installation Wizard provided with JRebel provides you a guide to get it working in Eclipse. Make sure you go through those steps. (...adding org.zeroturnaround.* etc in Eclipse preferences)
- Modified the dev_appserver.cmd, which on my PC sat in
C:\dev\eclipse\eclipse-SDK-3.6-win32\plugins\com.google.appengine.eclipse.sdkbundle.1.3.7_1.3.7.v201008311427\appengine-java-sdk-1.3.7\bin\dev_appserver.cmd
Here is it's contents:
@java -cp "%~dp0\..\lib\appengine-tools-api.jar" ^ com.google.appengine.tools.KickStart ^ --jvm_flag=-javaagent:%REBEL_HOME%\jrebel.jar --jvm_flag=-noverify ^ com.google.appengine.tools.development.DevAppServerMain %*
- Now you need to add this to the VM Arguments for your Run configuration for your App Engine application:
-javaagent:/opt/jrebel/jrebel.jar -noverify
Again, make sure this points to your jrebel.jar location.
- Once you've modified the VM Arguments in the app run config then you should see the JRebel text appear in the console.
- By the way, you don't need to execute your application in Debug mode to get JRebel to work. If you modify a file in Debug mode you'll still get the "Hot Code Replace Failed" message.
- To test I simply booted up the app, and added a method to a class and called it - You'll see a message in the console saying that JRebel is reloading the class.
Now enjoy a considerably quicker method of developing / deploying App Engine apps. $59 bucks is well worth it!
I'm hoping the team at Zero Turnaround turn their attention to Android's Dalvik VM next. JRebel would be of HUGE benefit to developing Android apps and I'm sure with the amount of Android developers out there at the moment it would be a big money spinner for them too.