Minimal NetBeans Platform Dependencies

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.

Comments:

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
« March 2015
SunMonTueWedThuFriSat
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    
       
Today