Little confused here. Looked around and haven't found anything. Lots of people seem to be having similar problems but I haven't seen a solution yet.
I cloned the IntelliJ gradle non-moduler hellofx sample application from here.
Builds and runs okay, good.
I then tried to build an artifact. I did Add -> JAR -> from modules with dependencies...
Resulting in:
Building the artifact and trying to run it gives me the following error:
"C:\Program Files\Java\jdk-11.0.2\bin\java.exe" -Dfile.encoding=windows-1252 -jar E:\hellofx\out\artifacts\hellofx_main_jar\hellofx_main.jar
no main manifest attribute, in E:\hellofx\out\artifacts\hellofx_main_jar\hellofx_main.jar
But the Main-Class attribute is in the manifest file that was generated when building the artifact: