I was recently faced with a slightly different problem, of how to serialize and deserialize polymorphic objects using JSON, and as I've now successfully fixed the problem I wanted to share with you how I did it.
This blog post will demonstrate how to customise the NetBeans Installer which can be used when creating NetBeans platform based applications. First of all you will need to create a new Maven based NetBeans application project. You can get full instructions on how to create a project here. Just give your project a simple name or even complete the full tutorial and then follow this guide.