How to run and distribute my GUI application created in NetBeans?
Matisse GUI builder uses an external library containg various layout-related extensions. You can find the library in the NetBeans' library manager under Swing Layout Extensions name.
The library is added to your project's classpath automatically. When you build the main project, the swing-layout-version.jar file is copied into the dist/lib folder of the project and the built project's JAR is linked with the library JAR (via classpath entry in manifest file) so you can run it just via:
java -jar myproject.jar
To distribute the application, just pack everything under the dist folder. There is also a readme file describing all the details. Note that the project must have a main class set (i.e. represent an executable application), otherwise the dist/lib folder is not created.
If some problem appears, e.g. you get error looking like this:
then make sure the Swing Extension Library is present in the project's libraries and the project has a main class set. Then rebuild the project.
You can find the library file in the NetBeans installation directory, in case you liked to treat it manually:
If the NoClassDefFoundError persists, try to pack the library inside application jar file (described here).
Applies to: NetBeans 5.0, 5.5, 6.x