r/JavaFX • u/MrAbc-42 • Jul 07 '24
Help How to deploy a self-contained JavaFX application using Maven?
I built a small desktop application for myself in javafx/maven. And I would like to be able to install it on my computer without having to worry about whether it has Java or not or whether it has JavaFX. What is currently the best approach to accomplish this?
5
Upvotes
View all comments
Show parent comment
2
u/Birdasaur Jul 07 '24
For Trinity we use a combination of Github Actions to automatically build all the native executables for all the major OS platforms. We also maintain a build.gradle script that does what generationextra describes so I can quickly produce adhoc builds.
Since we combine it with JLink as a module project we automatically reduce the total executable size dramatically. Here is the build script as an example: https://github.com/Birdasaur/Trinity/blob/main/build.gradle