You can use jlink to create a custom runtime you can distribute with your application, so that your users don't need to download a JRE/JDK. You'll still need to run this with the java command.
You can use also jpackage to create an executable file you can just double-click (.exe on Windows, whatever on mac and linux).
You can use also jpackage to create an executable file you can just double-click (.exe on Windows, whatever on mac and linux).