0

I have searched for the solution everywhere, and my request is very simple. I am working on the maven project in intellij idea 2022.3.2 community Edition with javaFX 19 and ikonli dependencies , and I simply want to make an executable Jar, and apply all the methods on the Internet includding this forum, and every time I get a different errors. In addition, an simple example of this project is in the link below, I am grateful for those who create an executable jar and tell me the way. thank you.

https://github.com/MeshkatSoft/Ikonli_Maven

-----update--------------
I have done all the solutions, and I find myself helpless. please, I ask one of the experts to download the project, work on it with IntelliJ idea and get a file that works on Windows Linux and Mac. He tells me the way, and I will be very grateful for him. thank you

Talib3ilm
  • 33
  • 3
  • 1
    Don’t create an executable jar, instead use jlink or jpackage. That is my opinion anyway. Easiest is to use the maven JavaFX plugin to create a zipped jlink image of a modular project, if your app can be fully modularized. – jewelsea Feb 14 '23 at 16:15
  • 1
    What is meant by `apply all the methods on the Internet includding this forum`? – SedJ601 Feb 14 '23 at 16:17
  • 1
    For JavaFX desktop applications, the best deployment strategy is `jpackage`, at least in my opinion. Note that tool uses `jlink` behind the scenes, though `jpackage` works with both modular and non-modular applications. But if you insist on creating an executable JAR file, what exactly are you trying to accomplish? A JAR file that has to have its dependencies deployed alongside it? A so-called fat/uber JAR file with all dependencies, including JavaFX? A fat/uber JAR file with all dependencies _except_ JavaFX (because you require your end users to have a JRE-with-JavaFX installed)? – Slaw Feb 14 '23 at 19:57
  • I have done all the solutions, and I find myself helpless. please, I ask one of the experts to download the project, work on it with IntelliJ idea and get a file that works on Windows Linux and Mac. He tells me the way, and I will be very grateful for him. thank you – Talib3ilm Feb 16 '23 at 03:29
  • You have already configured to use jlink. [Use the JavaFX maven plugin according to the documentation](https://github.com/openjfx/javafx-maven-plugin#javafxjlink-options): `mvn clean javafx:jlink`. It will create a deployable zip. Or, from idea click the `javafx:jlink` target in the maven panel. For Windows, Linux and Mac (both M and Intel processors), repeat the process on each of those machines. I realize that could be hard without the machines. If you want a single jar instead, then you will need to do a little more work and follow the instructions in the duplicate question. – jewelsea Feb 17 '23 at 07:51

0 Answers0