Module Development Turnaround Time: Better Than You Thought

So you're creating a desktop application in NetBeans IDE, basing it on the NetBeans Platform. You generate the skeleton from the Module Suite Project wizard. You add a few modules. You add a few Swing components to the modules. You run the project, see the splash screen, all the modules are loaded into the NetBeans Platform, and then you see the application up and running. It looks okay, but you'd like to improve it some more. You close down the application. You add a JButton to one of the modules. You run the project again. And then you see the splash screen again and the whole application starts up again, loading all of the modules. You're waiting and waiting and waiting. And all you wanted to see was the addition of your one simple JButton!

But, not really. You're just not aware of the power of NetBeans IDE's module development support. Here are two tips:

  • Don't shut down the application. Just leave it running.
  • Whenever you add something to a module, and you want to see it in action within the application... right-click the module and choose "Install/Reload in Target Platform". Since the module belongs to the module suite, and the module suite is your application, the module loads into the running application and you can see the result right away.

As a result, reloading a module takes only a few seconds. (If the TopComponent for which you made the change is already displayed in the running application, you just need to reopen it, to refresh it, but that's the only additional step I needed to take.)

Comments:

Also if you run the app in the debugger, you can use Run > Apply Code Changes to use JPDA hot swapping. Only works for changes made in Java source code (that do not add/remove methods/fields/etc.), so limited but still useful in some cases.

Posted by Jesse Glick on October 10, 2006 at 02:58 AM PDT #

this is very help hint "Install/Reload in Target Platform". Now I have discover more on NB. this has cut the test time from 50 seconds to less than 10 seconds! depend on your machine and project size.

Posted by iamnobanker on June 08, 2007 at 12:57 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today