JavaFX Platform specific package on Windows
Answered
1. I open Intellij Community 2021.3 on Windows 11.
2. I select the JavaFX type of project, using the default options.
3. I run the main/Application to see if it works in the IDE, and it does work.
4. I go to File > Project Structure > Artifacts and create a new artifact of type "Platform specific package" and set the packaging main class to my main/Application class.
5. I build the Artifact. Then I open the out > artifacts directory and run the .exe installer. Then I open C:\Program Files and find the folder of my project and run the .exe application.
Nothing happens.
I tried to run a Java Swing application instead of a JavaFX project and it works just fine. Does anyone have any suggestions?
Please sign in to leave a comment.
Packaging JavaFX applications is a complicated process, please see https://github.com/dlemmermann/JPackageScriptFX .
I found a video that shows how to use JPackage from the terminal inside of Intellij IDEA:
How To Use JPackage to Create an exe and msi Installer for JavaFX 17 Application on Windows 11 x64
The video has been updated, in a new video, with the full explanation of how to do this:
How To Deploy JAR, exe and msi for JavaFX 17 Application on Windows 11 x64 (Updated) - YouTube