Java EE Gems In NetBeans 7--Milliseconds Incremental Deployment

On every "save" NetBeans deploys your application behind the scenes in milliseconds. This works well with standard NetBeans Java EE projects (ant based), or with maven 3. Maven 3 projects can be also deployed in the "on save" fashion incrementally.

You only have to "Run" your application instead of "Clean and Build" or "Deploy" it. After an initial "Run" (right mouse click on project, then choose "Run") just saving a file causes an incremental redeployment of the application. It works in most of the cases, but sometimes you will have to "Clean and Build" your project. "Clean and Build" causes a recompilation and redeployment of the whole application - it is also fast (but application size dependent) and takes a few seconds.

Java EE 6 Makes NetBeans Even Leaner - New Java EE Bundle Available

NetBeans 7 daily builds come with a dedicated Java EE Bundle. For Mac OS X the download size of the Java EE bundle (NetBeans 7 Development) is 152 MB (IDE + everything you need for Java EE 6 development) comparing it to 192 MB NetBeans 7 Beta Java build. Try it.

It also means: the difference between "Plain Java NetBeans" and NetBeans Java EE edition with Glassfish is only 93 MB...

Useful JSF 2 / CDI Table Generation Wizard in NetBeans

  1. You will need a (JPA) domain object with getters / setters. Sample:
    public class FireFluid {
        private long id;
        private String name;
        private int amount;
        public FireFluid() {
        public String getName() {
            return name;
        public int getAmount() {
            return amount;
  2. An in EL accessible Collection / List returning the domain objects is also necessary. The simplest way is to use a CDI bean to expose the list to the view:
    public class Index {
        PalincaCommanderService pcs;
        public List getFireFluids(){
            return pcs.all(name);
  3. Go to Window -> Palette. Drag the last Entry "JSF Data Table From Entity" and NetBeans will pop-up a dialog with a property and entity suggestion. After confirming the choice, you will only have to import the f: namespace. This can be done with Alt+Enter: The result is:

<h:dataTable id="table" value="#{index.fireFluids}" var="item">
         <f:facet name="header">
             <h:outputText value="Name"/>
         <h:outputText value="#{}"/>
         <f:facet name="header">
             <h:outputText value="Amount"/>
         <h:outputText value="#{item.amount}"/>

The freemarker template of the generated code can be also customized. Just click on the link in the pop-up.
[I borrowed the code from Palinca JUG Transylvania sample.]

Swing Looks ...Great (Part III Nimbus)

Nimbus comes already with JDK 1.6.

Nimbus doesn't have to be installed, it is shipped with JDK 1.6. You only have to activate it. There is a hacky (because of reflection) but robust way to activate that. This complex approach is needed, because Nimbus was introduced with JDK 1.6u10 and was not available before.

try {
    for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
        if ("Nimbus".equals(info.getName())) {
} catch (UnsupportedLookAndFeelException e) {
    // handle exception
} catch (ClassNotFoundException e) {
    // handle exception
} catch (InstantiationException e) {
    // handle exception
} catch (IllegalAccessException e) {
    // handle exception

[Code Snippet from:]
The command line option can be used as well.

With NetBeans you can create a Nimbus mock-up in minutes (actually seconds).

Useful Maven Repository Viewer In NetBeans

NetBeans comes with a useful Maven Repository Viewer: .

It also supports full text search for dependencies in all repositories. Also artifacts already installed in your local repository can be easily browsed. To open the view go to: Window -> Other -> Maven Repository Browser.

Seamless Terminal Integration NetBeans 6.9.1

NetBeans 6.9.1 comes with seamless Terminal integration. You can open the terminal view from: Window -> Output -> Terminal. From that you can open several remote and local terminals by clicking on the icons in the left upper corner.
I use the Terminal view to monitor local and remote Glassfish instances, tagging / pushing the hg repository. Enjoy!

Features I Missed In NetBeans 6.8, came with 6.9

NetBeans 6.8 didn't came without toString() generation and "Go To Implementation" navigation. Both features were available for Eclipse / IntelliJ, but not NetBeans. NetBeans 6.9.1 implements both:

  1. toString() method can be generated with cmd+i (Mac), or Alt+Enter (Win) and choosing toString. It comes, however, with a small bug - some blanks between attributes are missing (e.g. Post{" + "uri=" + uri + "[]title=" + title + "[]numberOfHits=" + numberOfHits + '}').
  2. You can easily navigate from an interface to its implementations, as well as from the implementations to its interface by clicking on the "I" icon. Interestingly: I do not use this feature a lot, because I was able to delete most of the interfaces with the introduction of Java EE 6 to my projects.

...already looking forward to NetBeans 7.0

JDeveloper vs. NetBeans - The Poll Results

The results are amazing: 434 (NetBeans) vs. 18 (JDeveloper). JDeveloper comes with some interesting stuff - it would be a nice extension of NetBeans. The integration wouldn't be that hard - both IDEs are Swing based...

NetBeans Is Very Poplular In Germany - Only 4 % Behind Eclipse

JavaMagazin's (one of the largest / the largest German Java magazine) quickvote is closed. The results are interesting:

  1. Eclipse - 44%
  2. NetBeans - 40%
  3. IntelliJ IDEA - 14%
  4. others - 2 %

Total votes: 2108
JavaMagazin covers a lot of Eclipse stuff. They also publish a dedicated Eclipse Magazin - so the result is really interesting. Btw. the "others" are: JDeveloper, WAS, Notepad, Emacs etc :-).

Online Workshops
...the last 150 posts
...the last 10 comments