Building a native Java Desktop application from scratch can be confusing - jpackage, jdeps, modules, etc.
To make this easier, try this JavaFX template to generate macOS and Windows installers automatically with a simple Maven build - no shell scripts required. This template includes examples of desktop integration features, including drag-and-drop from the file system, native macOS menu bar integration, and more.
Tip: this template relies on a Maven Plugin that makes it easier to work with Java tools that support the new Java ToolProvider API - including jpackage and jdeps. Once you start working with the JavaFX template, you may wish to tweak the configuration fed into this Maven plugin.