X

Geertjan's Blog

  • July 1, 2014

Minimal NetBeans Platform Dependencies

Geertjan Wielenga
Product Manager

When you have no more than this dependency in the application module of your NetBeans Platform application, you have all you need for the simplest imaginable NetBeans Platform application.

<dependencies>   
<dependency>
<groupId>org.netbeans.modules</groupId>
<artifactId>org-netbeans-core-startup</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
</dependencies>

The above results in one direct dependency (i.e., the first node below, which has a lightblue icon, meaning a direct dependency), together with 5 transitive dependencies (with grey icons below):

That starts up the NetBeans Platform, provides no user interface (except a splash screen, which you can supress via -nosplash), and thus lets you create command line tools on the NetBeans Platform.

For a GUI application, add two other direct dependencies, shown below:

<dependencies>   
<dependency>
<groupId>org.netbeans.modules</groupId>
<artifactId>org-netbeans-core-startup</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.modules</groupId>
<artifactId>org-netbeans-core-windows</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.modules</groupId>
<artifactId>org-netbeans-core-ui</artifactId>
<version>${netbeans.version}</version>
<type>jar</type>
</dependency>
</dependencies>

That pulls in a bunch of transitive dependencies, shown below:


Now, when you run the NetBeans Platform application, you see the main window, menubar, toolbar, etc.

That means that the answer to the question "what is the minimum number of dependencies for a GUI application on the NetBeans Platform?" is: 30.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.