New Article: "Programming NetBeans Platform with IntelliJ IDEA"

The NetBeans Platform allows rapid construction of an application that has some advanced capabilities, including templates, undo/redo, auto update, and more. It is an alternative to Eclipse Platform for those that wish to use standard Java Swing user interface instead of the Eclipse SWT user interface. The NetBeans Platform grew organically from the lessons learned about application architecture learned by the NetBeans IDE development team. Some of those lessons included the need to isolate the various parts of the application into "Modules" and the need to organize user interface items of interest into a hierarchy of "Nodes".

The NetBeans Platform enjoys use in many Java Swing-based Java UI applications. Some developers have acquired proficiency with the IntelliJ IDE and may wish to maintain or develop an application based on the NetBeans Platform without having to use the NetBeans IDE. This brand new article, which includes the texts above, shows the necessary steps to allow the IntelliJ developer to edit, compile, and debug a NetBeans Platform application from within IntelliJ IDE:

Great article, it's a step by step guide to setting up the famous NetBeans Platform Quick Start in IntelliJ, including annotation processing and debugging.


The android tools team moved from eclipse to intellij due to difficulty in extending eclipse. This is another case against eclipse. I believe Netbeans is as capable as intellij. It just needs more hands. Regards.

Posted by guest on September 09, 2013 at 03:01 AM PDT #

Hi Geertjan,
I think that your link:
is the best example why one should *not* use RCP (independent from whether it's Eclipse, NetBeans or something else). All applications look very similar, all application try to benefit from the default dialogs and windows (e.g., which - in my opinion - leads to using the same type of GUI which is not very user friendly and intuitive. Instead of going new ways in designing applications (see iOS or Android), RCP-applications (at least in your example) are not designed from a great user-experience, but from what the RCP most easily offers.
That's why I gave up learning RCP (for me as hobby programmer it's too complex) and still use the Swing Application Framework (JSR 296), which is really great for designing (desktop-)applications from the ground.
I would say, the way of designing a GUI should be: concept/idea of functions and how to best implement them considering usablity (form follows function). If I see RCP-applications, I have the feeling all are designed the other way round: what functions does (NetBeans-)RCP offer and how can we fit our application into this "corset", independent from whether it has great usability or not.
I have to clarify here, that I use NetBeans (non-RCP), because it's an absolutely great IDE, but I only use it because you provided the SAF-plugin for newer NetBeans versions...
Best wishes

Posted by Daniel on September 10, 2013 at 06:04 AM PDT #

Daniel, I believe using the same type of GUI is very user friendly and intuitive. Things I've learned from using NetBeans IDE can immediately be applied to JMonkeyEngine SDK or to the hundreds of other NetBeans Platform applications. Secondly, if you're creating really large applications, you need modularity and a window system, plus many other basic features, none of which SAF even tries to provide. NATO and all the other organizations using the NetBeans Platform "corset" are extremely happy they made the decision to use the NetBeans Platform because it lets them focus on their business logic.

Posted by Geertjan on September 10, 2013 at 09:03 AM PDT #

A decent blog post about IntelliJ and NetBeans.

I'm not quite able to run the WordProcessor app because I still receive two errors from IntelliJ. These two are AnnotationTypeMismatchExceptions. I'm sure I'm missing something seemingly simple.

Error: java.lang.annotation.AnnotationTypeMismatchException: Incorrectly typed data found for annotation element public abstract java.lang.Class org.openide.util.lookup.ServiceProvider.service() (Found data of type java.lang.Class<?>)
java.lang.RuntimeException: java.lang.annotation.AnnotationTypeMismatchException: Incorrectly typed data found for annotation element public abstract java.lang.Class org.openide.util.lookup.ServiceProvider.service() (Found data of type java.lang.Class<?>)
at org.jetbrains.jps.javac.JavacMain.compile(
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(
at org.jetbrains.jps.cmdline.BuildRunner.runBuild(
at org.jetbrains.jps.cmdline.BuildSession.runBuild(
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$
at java.util.concurrent.Executors$
at java.util.concurrent.FutureTask$Sync.innerRun(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.annotation.AnnotationTypeMismatchException: Incorrectly typed data found for annotation element public abstract java.lang.Class org.openide.util.lookup.ServiceProvider.service() (Found data of type java.lang.Class<?>)
at sun.reflect.annotation.AnnotationInvocationHandler.invoke(
at $Proxy8.service(Unknown Source)
at org.netbeans.modules.openide.util.ServiceProviderProcessor.register(
at org.netbeans.modules.openide.util.ServiceProviderProcessor.handleProcess(
at org.openide.util.lookup.implspi.AbstractServiceProviderProcessor.process(
... 24 more

Posted by Derek on September 10, 2013 at 09:48 AM PDT #

Perhaps, the difference is whether you want to create an application that is only internally used for in your own company. In this case you may not take "usability" into account. But think of applications made for "users" (customers, private users etc.). Except for coding/programming tools that often have similar (docked) windows like NetBeans platform, I don't know many apps that really look like that. Simply because it's not plain (simplicity) enough. The examples shown on the platform webpage are very technical applications, something that "normal" users mostly would not use.

I know of all advantages the platform technology offers. And I wish, SAF would have been developed further, so at least some more features would be included in the SAF. For me, it's more work to modify the GUI from the platform basic application to meet my needs that designing the GUI from the scratch, using SAF. I have coded an application that uses many windows, all of them were designed with the GUI builder in NetBeans. This app. is only about 3MB large, so there's no need for modular updates, I can simply update the whole app. In this case I did not need the advantages of the platform technology and could rely on a simple Java swing app. And I'm feeling comfortable with the SAF support according to window-management (saving position and size...).

Probably I really do largely misunderstand the usage of (NetBeans-)Platform - really helpful would be an example of a platform application that looks like, for instance, Evernote, 1Password or something like that. The "skeletal structure", the very basic platform GUI when creating a new NetBeans Platform project, looks even too much to me. I prefer starting completely from the scratch with my GUI...

Anyway, again I want to remark that I really enjoy using NetBeans, even if I only develop my apps with the SAF-plugin. ;-)

Posted by Daniel on September 10, 2013 at 12:46 PM PDT #

You don't know any apps that look like that? I guess you don't know about Gephi ( and hundreds of other NetBeans Platform applications. Users of Gephi are pretty normal users, users of AgroSense ( too, many of those applications don't have any technical end users at all. You wish SAF had been developed further to have more features? So, that means you don't understand SAF (as well as not understanding the NetBeans Platform), since SAF was explicitly intended not to have many features, the theory behind SAF is that developers don't really need many features in their frameworks, which is -- in my humble opinion -- totally absurd and the reason why large applications can't be based on SAF because you really need to have at least a window system and modularity if you're going to create large maintainable applications.

Posted by Geertjan on September 10, 2013 at 10:45 PM PDT #

In regards to the Error: java.lang.annotation.AnnotationTypeMismatchException

I had the same problem. I fixed it by adding a UppercaseFilter module dependency on WordEditorAPI

Posted by mike on December 11, 2013 at 10:09 PM PST #

Post a Comment:
  • HTML Syntax: NOT allowed

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.


« June 2016