Book Image

Instant JRebel

By : Jonathan Lermitage
Book Image

Instant JRebel

By: Jonathan Lermitage

Overview of this book

JRebel is a JVM plugin that lets Java developers update code instantly and see their changes reflected in their application under development without restarting the application server. JRebel is a plugin for anything that is in Java and is also IDE neutral. If you want to update your code instantly without compiling and deploying the code repeatedly, this book is for you.This book will focus on the most important development steps and will also help you save time which is otherwise spent on compilation and deployment of code. You will learn how to use JRebel with the most popular IDEs and Java servers and how to accelerate the development of your current and future Java SE and Java EE projects.This book shows you how to install JRebel, configure your favourite IDE and Java server for JRebel, and start using it on your projects.With this book, you will learn how to get a free license for JRebel and how to integrate JRebel with most Java servers and development environments. To finish, you will see how to work with desktop and web projects and how to utilize JRebel to dramatically accelerate their development.
Table of Contents (7 chapters)

Registering a JRebel account (Must know)


To use JRebel, you need a ZeroTurnaround account. We'll see how to register a trial account for commercial projects and a free account for open source and non-commercial development.

Getting ready

You can register two types of accounts: a free account for open source or Scala projects, or a 14-day trial (for commercial purposes).

Also, free accounts don't allow you to integrate JRebel in a standalone server, you'll have to use the JRebel plugin for IDEs. In other words, it means that a free account allows you to register a server in the IDE and use the JRebel plugin only; you always work on your local machine. The trial version doesn't have this limitation and allows you to install JRebel directly in a server; this way you can use a server installed on a remote machine, and use NetBeans and its JRebel plugin to connect to the remote server.

To get a free account, go to https://my.jrebel.com/register and fill out the form to register an account. You can also use your Facebook or Twitter account, but keep in mind ZeroTurnaround will ask you about posting contents on your behalf. You will receive a confirmation e-mail. Once your account is confirmed, return to the previous link and use your new account to log in (if needed). Now, you have to choose one of the three available plans. Go to https://my.jrebel.com/plans and choose a plan from the following:

  • Scala: This plan is used for Scala projects

  • OSS: This plan is used for open source software

  • Social: This means that you will connect your Facebook or Twitter account to your JRebel account

    Note

    Keep in mind that these three plans are for non-commercial projects only, otherwise, please use the 14-day trial. ZeroTurnaround, the creator of JRebel, is able to invalidate your license without notice, remotely.

Complete the forms and you will receive a license key by e-mail. You can also visit https://my.jrebel.com/account/how-to-activate to get it immediately.

To get a trial license, go to http://zeroturnaround.com/software/jrebel/trial/ and fill out the form on right-hand of the web page to register a 14-day trial account. Once registered, you will be automatically redirected to a web page that shows your JRebel Product Activation Key. Copy it in a text editor, we will be using it very soon. You will also receive an e-mail from zeroturnaround.com containing this key.

If you have already tested JRebel with a free trial account, you may want to use it in a commercial project. To buy a commercial license, visit http://zeroturnaround.com/software/jrebel/buy/ and choose the Base or Enterprise option. The main difference between these two plans is the number of developers in your company. Also, enterprise licenses come with a license server, a tool that gives you more control of your license files (you can easily activate and revoke licenses). Check http://zeroturnaround.com/software/jrebel/download/license-server/ for more details.

How to do it...

In this section, we will see how to register and activate your JRebel license. The following are the steps to register and activate it:

  1. Download the JRebel runtime from http://zeroturnaround.com/software/jrebel/download/#!/. The download link is at the bottom of the page: please use the «current stable» version of JRebel), and extract it to your local drive. In this tutorial, we will assume that JRebel has been unpacked to C:\packtpub\jrebel\.

  2. Run C:\packtpub\jrebel\bin\jrebel-config.cmd (or the corresponding *.sh script file, if you are using a Linux operating system).

    Choosing the license

  3. Choose the New 14-day trial option if you have registered a 14-day trial account. Otherwise, choose the myJRebel license option.

  4. Validate the first screen and paste your license key.

    Copy/paste the license key

  5. Validate the screen. You'll see the following message: JRebel has been successfully activated, thank you!. Close the wizard; your JRebel license is now activated.

    License validation

  6. To finish, go to the user profile directory of your operating system, in the .jrebel subdirectory (%userprofile%\.jrebel\ on MS Windows); you will see a jrebel.lic file that contains your (encrypted) license key. This is the file that JRebel will check at every startup.