cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

DevFaqHowToReuseModules

I want to reuse some of my modules in several RCP applications. How to do it?

I want to use modules from update center in my RCP applications. How to do it?

Since 6.7 you can use use non-netbeans.org modules (yours or 3-rd party) directly in your suite and configure it conveniently via GUI. Go to Properties of your suite project, Libraries tab:

Image:reuse-modules-1_DevFaqHowToReuseModules.png

If you have sources of modules you want to reuse, click Add Project... button and browse for suite or standalone module project you want to add.

If you want to use 3-rd party binary modules, just unpack them into cluster folder somewhere on your disk. Preferably put the cluster under your suite's root so that you can use relative paths, which makes setup in team environment easier. Then click Add Cluster... button and browse for the cluster folder:

Image:reuse-modules-2_DevFaqHowToReuseModules.png

You can also add sources and/or Javadoc for binary modules, just like for whole NetBeans Platform.

Once projects and clusters are added to Libraries and checked, they behave just like part of the platform. They will appear in running platform application, will be included in binary distribution, modules from your suite can depend on them, etc.

I cannot use 6.7 or newer platform, what to do?

You can actually use older platform as long as you configure it to use newer harness (either via Tools -> NetBeans Platforms in IDE or by specifying harness.dir) and you develop in new enough IDE.

If you cannot even use new harness and/or IDE, you have to use suite chaining, build your own platform and depend on it. See harness/README file for details. See also HowToReuseModules.