DevFaqNonGuiPlatformApp
Can I create a console or server (non-GUI) app with the NetBeans Platform?
While most documentation explains the NetBeans Platform in terms of Java desktop applications, it is possible to build a non-GUI application on the NetBeans Platform. This might be useful, for example, when creating a platform-based application which will distribute computationally expensive work among a group of machines.
This is done by simply starting with the NetBeans Platform and removing all but the most essential components. NetBeans architect Jaroslav Tulach calls this subset of the NetBeans platform the "runtime container" and wrote an application which uses it to control his television.
Here are the steps for creating a runtime container application:
- Create a new suite
- Exclude all clusters from the suite
- Re-enable the platform cluster, but disable all but the following modules:
- Bootstrap
- File System API
- Module System API
- Startup
- Utilities API
- Add a new module to the suite
- Create and register a ModuleInstall class
- The restored() method is effectively your application's main method.
- You may optionally override the close() method of your ModuleInstall to clean up resources upon shutdown.
You will also need to supress the splash screen by passing --nosplash argument when starting the app.
Applies to: NetBeans 6.5, 6.7

