Home > Uncategorized > NetBeans platform development with JRebel even more simplified

NetBeans platform development with JRebel even more simplified

Many things in the JRebel universe have changed in the last months. Several new versions of JRebel were released, Zeroturnaround acquired Javeleon [1] and the JRebel-Plugin for NetBeans IDE got better and better.

Especially the support for developing NetBeans platform/RCP applications has been improved. In my posts [2], [3], [4] I showed you how to configure JRebel to reload your changes within NB platform/NB IDE modules. These are mostly obsolete. The whole process has been simplified, the number of manual steps have been reduced. For example: you don’t need to modify any property-file anymore to tell NetBeans to load the JRebel as javaagent.

Please note that the following description only applies to ant-based module development. The maven-based module development still requires some additions to the pom.xml to get JRebel running.

So if you want to use JRebel to “instantly reload” your compiled changes to a fixed- (or locally compiled bleeding-edge-dev-) version of NetBeans IDE (or your own target platform) you have to follow these simple steps:

  1. install the JRebel-NetBeans-Plugin from the plugin portal and register your license, if not already done
  2. open your module (or open a module from the checkout sources of NB IDE)
  3. generate a rebel.xml in the source folder of the module – let the JRebel-plugin do this for you (right click on the project node, then “Generate rebel.xml“)
  4. make sure that the JRebel icon in the toolbar is checked (this is important, because this tells the plugin to add the -javaagent argument to command line of the next run/debug)
  5. run the module (you will see the JRebel headers in the output window, which means JRebel is loaded, and the target platform with your module activated will be opened)
  6. make your changes to the code, compile via F9 (this includes saving – that’s the trick)
  7. go back to the previously started instance of the target platform, repeat your actions and the changes in code are reloaded instantly (Please note that reloads of changes to layer.xml or additions to bundle.properties aren’t supported. In this case you still have to “build” and “run” the module again.)

This makes it much easier (at least for me) and I hope this simplicity will also attract other developers to write plugins or even to contribute to NB IDE development.

Tested with NB7.3/7.4dev, JRebel-NB-Plugin 1.5.1 and JRebel 5.2.2.

[1] http://www.prweb.com/releases/2013/3/prweb10543831.htm
[2] http://wp.me/pIpWO-64
[3] http://wp.me/pIpWO-5M
[4] http://wp.me/pIpWO-4n


Update 2013/10/13: To use JRebel with locally compiled bleeding-edge-dev version of NetBeans IDE you still have to set the tryme.arg.hack property in nbbuild/build.properties as described in [2]

For example: tryme.arg.hack=-J-Dnetbeans.full.hack=true -J-noverify -J-javaagent:c:/Users/markiewb/AppData/Roaming/NetBeans/7.4/jrebel/jrebel.jar -J-Xbootclasspath/p:C:/Users/markiewb/AppData/Local/Temp//rebelboot.jar -J-Drebel.log=true

Tested with JRebel 6.0-M3 and NB7.4


About these ads
Categories: Uncategorized Tags: ,
  1. 09/10/2013 at 18:05

    Awesome, thankyou, after two years of using shellscripts to compile, cluster and deploy I now know hot to do hot deploys with Netbeans module development. Thanks once again.

  1. 27/10/2013 at 23:15

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: