Latest news

JavaRebel 1.1.2 Released

An incremental update to the stable branch of JavaRebel....

Get a free JavaRebel license

We will give away 50 personal JavaRebel licenses to those who register first. Also personal licenses will be discounted to $49 unt...

JavaRebel offers free licenses to JavaBlackBelt brown belts

JavaRebel offers permanent licenses to all JavaBlackBelt's brown belts. This is a personal 1 seat commercial license that you can ...

Archive for April, 2008

JavaRebel 1.1 Released

Wednesday, April 30th, 2008

JavaRebel is a JVM plugin (-javaagent) that enables reloading changes made to Java class files on-the-fly, saving developers the time that it takes to redeploy an application or perform a container restart. It is a generic solution that works for Java EE and Java standalone applications.

It is our greatest pleasure to announce the immediate availability of JavaRebel 1.1 final release! The release is a result of more than 6 months of work from the ZeroTurnaround team and includes the following changes in comparison to 1.0.x:

  • Unexploded development. Now you can run JavaRebel without having to change your build cycle in the least. See the installation manual and this article.
  • Improved debugging. No need to step through generated methods anymore, see this article.
  • Full reflection support. All changes to methods, fields and annotations will show up also via Reflection API.
  • Dynamic proxy support. Support for JDK, CGLib and Javassist dynamic proxies allows to add methods to classes behind proxies.
  • Full support for Java 1.4. All of the features available in Java 5 are also available in Java 1.4. The installation is also now simpler and supports more containers. See installation manual for details.
  • JavaRebel SDK. With the SDK you have full access to the JavaRebel API and can use it for custom integration or to enable configuration reloading. The community site includes additional support for Google Guice, Stripes and Commons-EL.

To celebrate this release and to prove that 1.1 is stable we will give one free unrestricted personal license for any issue that you help us fix until 1st June. The campaign rules follow:

  • Bug reports must be registered on our support forum.
  • We must be able to fix the bug from your reports and it must require a code change, not just configuration change.
  • All bug reports filed before 1st June (including currently open ones) are eligible even if the issue is fixed later.
  • Duplicate bug reports will receive a free license at our discretion, if we think that the new information helped us fix the bug.

To receive the license send an e-mail to support at zeroturnaround dot com with a link to your bug report and this announcement.

Watch the demonstration screencast (~2 mins), read the feature list or download JavaRebel from ZeroTurnaround.com and give it a try. JavaRebel is commercial software with a free trial for 21 days and developer seat cost at 149$.

JavaRebel 1.1-RC2 Released

Monday, April 28th, 2008

JavaRebel 1.1-RC2 includes just a few minor fixes, download it now. We expect to release JavaRebel 1.1 GA on Wednesday, so stay tuned.

ZeroTurnaround is the Platinum Sponsor of Scala LiftOFF

Thursday, April 17th, 2008

We are great fans of Scala and Lift and are glad to support the first official community gettogether. Scala LiftOFF takes place one day after the end of JavaOne at 301 Battery Street, Third Floor in San Francisco on Saturday May 10th. We sincerely advice everyone in the San Francisco area at the time to come to this one-day unconference even if you haven’t played with Scala yet. You won’t regret it!

JavaRebel 1.1 RC1 Released

Wednesday, April 16th, 2008

The first release candidate for the 1.1 version is available for download. The main addition to the previous version is greatly expanded support for Java 1.4. Now installation is same for all containers and supports everything that was supported under Java 5. There are also no longer any restrictions in reflection support and so on. Check out the updated installation manual for details.

Zero turnaround with unexploded development

Friday, April 11th, 2008
The latest release of JavaRebel introduced two new approaches for achieving zero turnaround. Firstly if you have deployed your EAR/WAR/JAR as single archives you can still make the application use the classes that you are compiling on-the-fly with your IDE. This is what we are calling unexploded development. The other method is hot JAR replacement which is considered experimental at this point.

In this article we will look at how to setup the development environment to support unexploded development. We will take the Spring Framework sample named PetClinic. We will deploy this to JBoss as a WAR archive and then start modifying the classes in Eclipse IDE and see the changes on-the-fly from the browser.

Before we continue lets look how it works. Once an application is deployed to the container (in this case JBoss) it will start loading the application classes. JBoss is running the JavaRebel agent that will intercept the calls and load those classes from the preconfigured IDE output directory.

Note however, that this means that if a new class is added in the IDE but not present in the JAR files, the JAR files needs to be updated. Why? We are still talking about the classloaders of the container. Container only knows and looks for classes that are present in the EAR/WAR/JAR files and these zip archives are cached. So adding classes still requires the redeployment of the zip archives.

The normal development model in unexploded development looks like this:

  1. Code modifications
  2. Build the archives
  3. Update the EAR/WAR/JAR in the container
  4. Restart the container or redeploy the application
  5. Check the modification

We will change this into:

  1. Code modifications
  2. Background compiling
  3. Check the modification

We assume you have downloaded the Spring Framework (in this case the version number is 2.5.3) and created a Java project from the folder spring-framework/samples/petclinic. We have enabled the IDE to build automatically the source files. Eclipse will by default start building classes to the spring-framework/samples/petclinic/.classes folder.

Lets build the WAR archive. Open up a console and change directory to spring-framework/samples/petclinic. Issue the command ant warfile. It will produce a petclinic.war in spring-framework/samples/petclinic/dist. Copy this file to your JBoss’s deploy folder.

Start the database server for the application. Open up a console and change directory to spring-framework/samples/petclinic/db/hsqldb/ and issue the command server.sh (on Linux) or server.cmd (on Windows). This will start the database server. You should see something like this:

[Server@8813f2]: [Thread[main,5,main]]: checkRunning(false) entered
[Server@8813f2]: [Thread[main,5,main]]: checkRunning(false) exited
[Server@8813f2]: Startup sequence initiated from main() method
[Server@8813f2]: Initiating startup sequence...
[Server@8813f2]: Server socket opened successfully in 4 ms.
, alias=] opened successfully in 259 ms.0, db=file:petclinic
[Server@8813f2]: Startup sequence completed in 268 ms.
[Server@8813f2]: 2008-04-10 16:00:59.471 HSQLDB server 1.8.0 is online
[Server@8813f2]: To close normally, connect and execute SHUTDOWN SQL
[Server@8813f2]: From command line, use [Ctrl]+[C] to abort abruptly

Now lets add a configuration option to the JBoss startup script. We presume you have already installed JavaRebel. We will modify the JBoss/bin/run.sh (on Linux) or JBoss/bin/run.cmd (on Windows). First lets find the full path of the folder that your IDE is compiling the classes to. In my case it is /home/demo/projects/spring-framework/samples/petclinic/.classes. Lets add this as a Java -Drebel.dirs option to the JBoss startup script. So JBoss will have the flag -Drebel.dirs=/home/demo/projects/spring-framework/samples/petclinic/.classes on startup in addition to the usual JavaRebel flags. See JBoss installation for details on modifying the startup scripts.

Lets start the server. As the petclinic.war has been copied to the deploy folder, JBoss will deploy the application on startup. Depending on the server port visit http://localhost:PORT/petclinic. You should see the petclinic application homepage.

Petclinick Homepage

Now lets verify that everything got configured correctly. We’ll make a modification to a Petclinic class and see the output. We’ll test this by changing the validation of adding owners. In the browsers naviagate to “Find Owner” » “Add Owner”. Click “Add Owner” without filling any of the fields. You will see a page where it is stated that all fields are required.

PetClinick Required Fields

Open the file org.springframework.samples.petclinic.validation.OwnerValidator in your just configured IDE project. We will modify the validate method. You will see validation rules:

public void validate(Owner owner, Errors errors) {
    if (!StringUtils.hasLength(owner.getFirstName())) {
        errors.rejectValue(“firstName”, “required”, “required”);
    }
    if (!StringUtils.hasLength(owner.getLastName())) {
        errors.rejectValue(“lastName”, “required”, “required”);
    }
    if (!StringUtils.hasLength(owner.getAddress())) {
        errors.rejectValue(“address”, “required”, “required”);
    }
    if (!StringUtils.hasLength(owner.getCity())) {
        errors.rejectValue(“city”, “required”, “required”);
    }
    String telephone = owner.getTelephone();
    if (!StringUtils.hasLength(telephone)) {
        errors.rejectValue(“telephone”, “required”, “required”);
    }
    else {
        for (int i = 0; i <telephone.length(); ++i) {
            if ((Character.isDigit(telephone.charAt(i))) == false) {
                errors.rejectValue(“telephone”, “nonNumeric”, “non-numeric”);
                break;
            }
        }
    }
}

Lets remove the last name, address and city validations. The method will look like this now:

public void validate(Owner owner, Errors errors) {
    if (!StringUtils.hasLength(owner.getFirstName())) {
        errors.rejectValue(“firstName”, “required”, “required”);
    }

    String telephone = owner.getTelephone();
    if (!StringUtils.hasLength(telephone)) {
        errors.rejectValue(“telephone”, “required”, “required”);
    }
    else {
        for (int i = 0; i <telephone.length(); ++i) {
            if ((Character.isDigit(telephone.charAt(i))) == false) {
                errors.rejectValue(“telephone”, “nonNumeric”, “non-numeric”);
                break;
            }
        }
    }
}

Now when you click “Add Owner” button again you will see that the requirement for the last name, address and city are gone now.

PetClinic Less Required Fields

You should also see the line JavaRebel: Reloading class 'org.springframework.samples.petclinic.validation.OwnerValidator'. in JBoss server log.

If the validation rules have been reloaded, you have successfully configured the unexploded development format. You have deployed a WAR file and made the container aware of the location from where to find the modified classes.

If you have multiple locations to look for the classes you can specify a comma separated list of location to the -Drebel.dirs option.

If you have any comments, suggestions or questions don’t hesitate to ask either in the comments section or via support at zeroturnaround dot com

ZeroTurnaround to Sponsor JAX and JavaOne 2008

Wednesday, April 9th, 2008

This year you can see the ZeroTurnaround booth at a lot of developer ventures. For a start we welcome all JavaRebel current and future users to Wiesbaden on 21st to 25th April and San Francisco on 6th to 9th May. Two main JavaRebel developers will be manning the booth, so if you have any questions or suggestions it’s a great place to let us know.

JavaRebel 1.1-M3 Released

Wednesday, April 9th, 2008

The latest development version of JavaRebel features two most requested improvements:

  1. You can now develop with unexploded WAR/EAR/JAR, while still compiling instantly with your IDE. To do that just set the “-Drebel.dirs=/path/to/classes1,/path/to/classes2,…” JVM command line property and JavaRebel will load the “.class” files from those directories instead of from EAR/WAR. The disadvantage in this solution is that since newly added classes are not present in the classpath, JavaRebel will not see them before you recompile your WAR/EAR/JAR (which may still not work in some containers).
  2. You can now mark JARs as reloadable (either set “JavaRebel-Reloadable: true” in MANIFEST.MF or make the JAR name end in “-reloadable.jar”). Reloadable JARs will be monitored for changes and classes in them reloaded as usual. This way you can use your usual build cycle instead of IDE building. Note that you still need unexploaded WAR/EAR, just classes may be in JARs. This feature is considered experimental and is first of all meant for production support in future versions of JavaRebel.

For other changes see the changelog or just download now and try it out!

Accepting PayPal payments

Thursday, April 3rd, 2008

As of today we also accept payments made via PayPal. We have added a paypal button to our buy page. The checkout process is the same as before but you will get redirected to the PayPal website for the payment process.

Paypal is a worldwide online payment solution supporting multiple payments methods (credit cards, bank transfers etc.), available in 190 markets and 17 currencies around the world.

JavaRebel Tutorial - Tomcat & Windows

Thursday, April 3rd, 2008

Everybody does not have a standard installation of a JEE container and a development environment. As JavaRebel installation is a matter of adding -javaagent:path/to/javarebel.jar -noverify flags to the JVM, it can always be installed but exact configurations differ from one development environment to another. Rob Sinner has documented how he configured his environment on Windows running Tomcat as a service to support zeroturnaround with JavaRebel.

JavaRebel Goes AI

Tuesday, April 1st, 2008

If anyone still doubts this announcement was an April Fool’s hoax. Thank you all for laughing!

As the Java programmers embrace JavaRebel we hear the same complaint again and again:

I used to take a coffee and chat with my friends while my application was deploying. Now that code reloads instantly I just can’t explain the breaks to my manager!

Since our customer satisfaction is most important to us we started working on making breaks painless. Since JavaRebel anyway must monitor all of the changes to the code, we projected that it could continue programming in the same pattern even when you’re away. After investigating the latest in machine learning we chose to use Support Vector Machines with a proprietary kernel that quickly learns your personal programming style.

This way, when you go to a break JavaRebel will continue to make changes to the code in the same pattern as before. Which means that your breaks are just as productive as working! Of course JavaRebel will not see the specification, therefore it is limited to writing unit tests and fixing simple bugs in the code.

David Pollak, father of lift and JavaRebel enthusiast:

I tried the JavaRebel AI module… it’s clearly smarter than I am and a better programmer… I just hope no-one in the lift community finds out.

Nathan Hamblen, of Coderspiel, had the following to say

I was surprised to learn that the singularity had arrived through an elaborate extension of “generate getters and setters.” But now that my JavaRebel AI has decompiled and rewritten itself (and most troubling of all, broken its license restrictions), I’d like to be the first to welcome our new robot overlords. Can I get you anything?

Not all responses were positive. Andreas Andreou, Tapestry committer and official Apache troll hunter:

From a recent study we conducted within our company, it was found that the JavaRebel AI module, however ingenious, can seriously harm one’s health. More specifically, out of 6 smokers that were forced to quit it due to Javarebel (not much spare time left for it), 5 have picked up their old habit again (too much spare time) and the sixth has left his PC in auto-pilot and gone on never-ending vacations.

The JavaRebel AI Module 1.0-M1 is available for download. Check out the screencast introducing the new features. A free trial is available, for the quote e-mail support at zeroturnaround dot com. No refunds.