0

I have installed JRebel plugin for Intellij Idea and my project is running with Jetty gradle plugin.

I run my project with "Run with JRebel", project perfectly runs, but hot swap which i expected is not working.

Does anybody have an understandable and detailed instruction how to set up Jrebel for work with jetty, gradle and intellij idea?

Alexey A.
  • 41
  • 1
  • 5

1 Answers1

0

1) You need to add JRebel Agent as a vm argument into Jetty.

Depending on your environment:

Windows 64-bit JDK  jrebel64.dll
Windows 32-bit JDK  jrebel32.dll
Mac OS X 64-bit JDK libjrebel64.dylib
Mac OS X 32-bit JDK libjrebel32.dylib
Linux 64-bit JDK    libjrebel64.so
Linux 32-bit JDK    libjrebel32.so

You need to add -agenthpath argument in gradle.properties file:

org.gradle.jvmargs=-agentpath:[c:\path\to\]lib\jrebel64.dll

2) You need to generate rebel.xml files for your projects in JRebel IDE plugin

Right-click on the project node in the Project View and select JRebel > rebel.xml. Alternatively, you can check projet in JRebel Modules window

3) You need to deploy(run) your projects into the Jetty with rebel.xml configuration files and when you make a code change in a .java file you need to generate new .class file. IntelliJ IDEA does not compile classes on save by default. Press Ctrl+Shift+F9 to compile the current file, module or package (you can also find this command via Build > Make Project).