JRebel Quick Start Eclipse - lukechi1219/DynamicWeb GitHub Wiki
Eclipse
https://zeroturnaround.com/software/jrebel/quickstart/eclipse/
Installation
Installing the JRebel plugin
- Open Help > Eclipse Marketplace…
- Search for JRebel. Found it? Press Install.
If the installation was a success, your IDE will restart. After the restart, JRebel will alert you via a notification.
Activation
Getting a license
- Open Help > JRebel Activation.
- Fill out the form.
- Press Activate JRebel.
JRebel will let you know that your license is activated via a notification. You can also see your license status from Help > JRebel Configuration.
Startup configuration
Adding JRebel agent to your server or standalone application
- Open Help > JRebel Configuration > Startup.
- Select Run via IDE.
- Select the check-box next to your server or application. Doing this will automatically run it with the required JVM arguments.
When successful, you will see the JRebel banner in the console right at server startup. This is what the JRebel banner should look like:
2016-04-25 13:48:25 JRebel: #####################################################
2016-04-25 13:48:25 JRebel:
2016-04-25 13:48:25 JRebel: JRebel Legacy Agent 6.4.3 (201604210950)
2016-04-25 13:48:25 JRebel: (c) Copyright ZeroTurnaround AS, Estonia, Tartu.
2016-04-25 13:48:25 JRebel:
2016-04-25 13:48:25 JRebel: Over the last 1 days JRebel prevented
2016-04-25 13:48:25 JRebel: at least 1 redeploys/restarts saving you
2016-04-25 13:48:25 JRebel: about 0 hours.
2016-04-25 13:48:25 JRebel:
2016-04-25 13:48:25 JRebel: #####################################################
Project configuration
Mapping your workspace to the deployed application
- Open Help > JRebel Configuration > Projects.
- Select the jrebel-ide-icon check-box next to your project. This will generate rebel.xml and keep it up to date.
- Redeploy your application!
When building your application, rebel.xml should be included within the application archive.
- In case of JAR files, rebel.xml should be included in the root folder.
- When working with WAR files, the rebel.xml should be located within the WEB-INF/classes folder.
- EAR files require a rebel.xml for each internal EAR module (that means JARs and WARs).
Reload your code
JRebel in action
- Make sure Project > Build Automatically is enabled!
- Restart your Java application.
- Change something in the application code.
- Refresh the application in the browser to see the changes!
JRebel relies upon your IDE to do the compiling. Enabling Build Automatically ensures that your .java files are compiled to .class files.