The Basic NetBeans™ Platform Series
The NetBeans™ platform: directory layout
Created on 08 July 2007, last updated on 31 May 2009
This article investigates the directory layout of the NetBeans™ platform. We introduce the locations of modules and their related configuration files, the launchers and the place where module update tracking data are stored.
The NetBeans™ platform is the central cluster of the NetBeans™ IDE as well as any NetBeans™-based application. The cluster simply is a directory with sub-directories and files inside. Instead of investigating the IDE's platform cluster, a binary zip-archive distribution of the platform may equivalently be considered, since it has the same structure with just a small number of additional—mostly build related—files not found in the IDE. Here is a screenshot of a sample NetBeans™ IDE 6.0 installation with the relevant platform directories expanded and highlighted:
Let us walk through the directories and their contents one by one.
Besides a set of sub-directories (ie
update_tracking) the cluster's root directory includes three files only, all of which deal with licences:
DISTRIBUTION.txt refers to JavaHelp™ software distributed with the NetBeans™ platform, while
LICENSE.txt contains NetBeans's CDDL licence as well as the GPL licence with classpath exception.
THIRDPARTYLICENSEREADME.txt embraces the LGPL licence refering to the Swing Layout Extensions integration module coming with the platform.
Here, only the two sub-directories
Modules are present which both hold external metadata required by the runtime container to obtain module information beforehand:
This directory is a kind of customer care, because it contains XML configuration files related to a NetBeans™ feature called automatic module dependencies. Imagine that a large module is going to be broken down into smaller ones. Such a design decision potentially would break existing API contracts and make the trustful developers quite unhappy. Luckily, the automatic module dependency mechanism based upon config file handles the situation by transforming old dependencies into new ones just before a module is loaded by the module system. In this way, backward compatibility of modules is maintained behind the scenes. The NetBeans XML document type definition (DTD) Automatic Module Dependencies provides the necessary grammar of the files shown in the next screenshot:
Most NetBeans™ modules are associated with runtime XML metadata (or module status configuration files) needed for module detection at runtime. These XML files are governed by the NetBeans™-specific Module Status DTD and, among others, the module type (ie regular, autoload, eager), JAR file location(s), and specification version are provided. The screenshot below only shows the topmost files:
This directory contains the JAR files of two modules constituting the NetBeans™ runtime container:
core.jar actually is module Startup and
org-openide-filesystems.jar is module File Systems API.
The Swing Layout Extensions integration module has shortly been mentioned above: it essentially wraps the
org.jdesktop.layout Swing-layout library, the most prominent member being the GroupLayout manager introduced with Java SE 6. The
docs directory hosts two related ZIP files, containing the Javadoc API documentation in the one (
swing-layout-1.0.3-doc.zip) , the library's sources in the other (
This is the location of the three remaining constituting modules of the NetBeans™ runtime container and the NetBeans™ launchers:
boot.jar represents module Bootstrap,
org-openide.modules.jar is the Module System API and
org.openide-util.jar is module Utilities API.
The launchers are:
nbexec on Unix® and Linux-like operating systems and
nbexec.exe on Microsoft® Windows®.
The Bootstrap module always is the first one to be loaded. And as it depends on the Module System API as well as the Utilities API modules, the contents of this directory is quite evident. So, both directories
platform7/core comprise the NetBeans™ runtime container.
Most JAR files of the platform's modules reside in this directory. Again, the screenshot only shows the topmost files:
The NetBeans™ platform includes a number of JARs which are wrapped into so-called simple library modules whose purpose is just wrapping. The JARs being wrapped are deposited here:
jh-2.0_05.jar is the JavaHelp™ system, it is wrapped by module JavaHelp Integration;
script-api.jar is the Java™ scripting support wrapped by module JSR 223 Integration. File
swing-layout-1.0.3.jar effectively is the binary of file
swing-layout-1.0.3-src.zip already mentioned in directory
platform7/docs. Finally, there is
updater.jar, which is concerned with module updates and update tracking; the corresponding module is Auto Update Services.
Each platform module may be auto-updated by a more recent version. This directory embraces update tracking XML metadata files for each module. Proper updating information includes a module's code base name, install time, specification version, the location of the runtime module XML metadata and JAR files, and a CRC checksum. All these data are stored in DTD-less XML files shown in the next screenshot:
Copyright © 2007–2009 by Volker Rautenberg. Some rights reserved.
Except where otherwise noted, text and images of this work are licenced to the public under the Creative Commons Attribution-Noncommercial 3.0 Unported License. The names of companies and products mentioned in this work are trademarks or registered trademarks of the respective trademark owners.