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)

Preface

Software development takes time, and consists of many phases. Meanwhile, two phases (software compilation and deployment) are ignored because they take a lot of time. Recompiling a large application is usually too long, and some users prefer to use a continuous-integration server, such as Hudson or Jenkins. It is a good idea, but you still have to wait to test and validate your work. This problem exists for both desktop and web applications. Also, web applications have to be deployed and updated after each code change, which is time consuming.

Modern IDEs are able to improve the compilation and deployment steps. Actually, they already do a very good job, and you could think it is not possible to work even faster. This is the main objective of this book. JRebel does the same job as IDEs, but you will understand why it is a killer app. Compilation and deployment times are almost reduced to zero.

What this book covers

Introducing JRebel (Must know) shows the principle of class loaders and how to improve their usage with IDE's smart-build systems and JRebel. Also, it explains why you should prefer JRebel.

Registerting a JRebel account (Must know) explains how to register a free account in order to use JRebel. This technology is not free, but most programmers may be able to get a license at no cost or a trial.

JRebel for a standalone Tomcat server (Should know) helps you to understand how easily we can integrate the JRebel technology with Apache Tomcat standalone server.

JRebel for a standalone GlassFish server (Should know) explains how to install and activate JRebel on GlassFish standalone server.

JRebel plugin for IDEs (Must know) explains how to install the JRebel plugin in three major IDEs: Eclipse, IntelliJ IDEA, and NetBeans. Also, you will see how to activate your JRebel license to use it with your IDE.

Working with Java SE projects (Should know) demonstrates the power of JRebel by using this technology with classical desktop applications; typically, software with a Swing graphical interface. Please note it also works with console applications.

Working with Java EE projects (Must know) explains probably the most interesting usage of JRebel. In this recipe, you will deploy a very simple servlet-based web application and learn how to accelerate your development dramatically.

Discovering LiveRebel (Become an expert) gives some words about popular frameworks support such as Hibernate and Spring. Also, it talks about best companion of JRebel; that is, LiveRebel, designed for production environments. Finally, you will be introduced to the JRebel license server, useful for large companies.

What you need for this book

You need to install a JDK (prefer Version 7), your favourite IDE: Eclipse, IntelliJ IDEA, or NetBeans. Also, you will need to download and install the latest version of Tomcat and Glassfish.

Who this book is for

The target audience of this book consists of people who know the Java SE and Java EE applications, but they need not be experts. Actually, simple Hello World programs can be connected with JRebel. Also, this is for audiences who know to use an IDE and how to install and configure it. They will understand how to accelerate their development with JRebel.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "You will be redirected to the jButton1ActionPerformed method of your JFrame object."

A block of code is set as follows:

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
  // TODO add your handling code here: 
  // jLabel1.setText("Hello World"); // previous message
  jLabel1.setText("Hello Planet");   // new message
}

Any command-line input or output is written as follows:

-Drebel.remoting_plugin=true

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes, for example, appear in the text like this: "Simply don't forget to enable the Use IDE's proxy settings feature."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.