FaqSellContributedModules
Can my contribution to NetBeans.org be included in a commercial product?
Yes - any organization or individual can do this.
However, any testing, bug reports or patches that get contributed to NetBeans will remain in the NetBeans project: royalty-free and freely available.