JRebel doesn't seem to work

I followed the JRebel tutorial and read the manual.
I made sure On Frame Deactivation is set to "Do Nothing"
I generated the rebel.xml.

I start the web server with JRebel debug mode.
The server starts showing that JRebel started too; however, it doesn't seem to be monitoring anything.

When I edit a class in IDEA and hit save, nothing happens. No log messages, no popup. And the class is still the old version in the server. It only changes when I manually select Reload Changed Classes. But I'm not sure if that's JRebel or the JVM hotswapper.

My rebel.xml is below. It's located in the source root.

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://www.zeroturnaround.com/alderaan/rebel-2_0.xsd">

     <classpath>
          <dir name="C:/workspace/intellijtrunk/out/production/intellijtrunk">
          </dir>
     </classpath>

     <web>
          <link target="/">
               <dir name="C:/workspace/intellijtrunk/WebRoot">
               </dir>
          </link>
     </web>

</application>

6 comments
Comment actions Permalink

Hi Uriel,

Sorry but JRebel plugin is not supported by JetBrains team. Please contact its authors.

Denis

0
Comment actions Permalink

You should set On frame deactivation to (update resource and classes) or manually make the project,then the jrebel will monitor your class change...and it will work

0
Comment actions Permalink

What are you two geniuses talking about? :-)

@Denis - Intellij supports JRebel and apparently has for several years now. See for example here: http://blogs.jetbrains.com/idea/2009/09/intellij-idea-and-jrebel-better-together/

@lance - your instructions are opposite to what the JRebel manual says, so unless the instructions are wrong, I don't think that's the reason why its not working.

It seems to be working now. The main issue was that we build the WAR file using a custom ant script. The ant script wasn't including the rebel.xml file.
The second issue is that I still have to manually reload changed classes. (I think this may be how IDEA works and the JRebel plugin doesn't override that behavior.)

However, even after manually reloading, IDEA still doesn't tell me when a class has been reloaded. I get no console messages or popups. I may have the plugin settings incorrect.

0
Comment actions Permalink

My suggestion just help you to resolve the issue(the second issue you point out): When you change the java source code,JRebel don't know this change and will not load the newly changed class!
When you set to "On frame deactivation to "Do nothing",it will not build the project,so the newly changed class will not be loaded by JRebel!
Set On frame deactivation to "Update classes and Resource",when frame deactivate ,IDEA will automatically build the project, JRebel will automatically loaded the newly changed class,That's all!

0
Comment actions Permalink

How did you conclude that JetBrains team supports JRebel plugin from statement like 'ZeroTurnaround announced their recently upgraded JRebel plugin for IntelliJ IDEA'

Denis

0
Comment actions Permalink

Ah you're right!

It looks like the JRebel tutorial may be wrong. This might be the expected setting --- the goal is to "Save" and have JRebel automagically reload the class. Thanks!

0

Please sign in to leave a comment.