dlemmermann / JPackageScriptFX

A tutorial project featuring a build script (Mac, Windows) for JavaFX applications based on the new jpackage tool.
https://www.dlsc.com
Apache License 2.0
226 stars 27 forks source link

jdeps not finding all dependencies in my setup? #14

Closed SerhiiPok closed 2 years ago

SerhiiPok commented 2 years ago

Hi, first of all, thanks for the project and the work you invest!

more a question than an issue, and sorry if that's a dumb question.

Are you sure that the jdeps command in the batch file is correct? I see that you specify no --module-path arg there to this command which means that a lot of dependencies will remain unresolved (you suppress this anyways with --ignore-missing-deps). Indeed, if I check the execution logs of maven clean/install, the detected modules are only the following ones:

thank you in advance! Cheers, Serhii

P.S. the generated .exe wouldn't start on my machine but I wanted to address something specific instead of asking generally why it didn't work

mipastgt commented 2 years ago

Hi, this template is supposed to be used by non-modular projects and the jdeps command is only used to find the JDK modules we need to build a runtime which is then linked in a second step with the other maven dependencies. Some of these dependencies cannot be found during the static analysis by jdeps. Therefore we need the manual ones. All JavaFX libs and your own libs (if any) are normal Maven dependencies. So far this setup has worked for all my projects and the projects of other people. So it cannot be completely wrong :-)

SerhiiPok commented 2 years ago

Hey, thanks! So, jdeps here is only supposed to select a subset of modules that are by default included in the standard jre? It is not supposed to bring in anything that is not part of the standard jre like javafx libs? Let's say in the standard jre we have modules A,B, C, and for my project I need modulr A and a maven dependency D. Then jdeps is supposed to create a jre with module A only. Do I understand this correctly?

mipastgt commented 2 years ago

Exactly.

SerhiiPok commented 2 years ago

Okay, thanks a lot! then it is failing due to some other reason. let me reproduce the case and come back with another ticket. I really didn't change anything in the code but, for some reason, it doesn't want to work

SerhiiPok commented 2 years ago

this has worked fine by the way... I have forgotten to switch to jdk 17! :( thx again, great project. There is as much as no info online on how to package fx apps. I am now going to try this setup with my more complicated javafx app, excited and afraid at the same time...

mipastgt commented 2 years ago

Don't worry. Be happy. Just an hour ago I got a relatively large project working on the Raspberry Pi which I never expected to work on the first attempt. I originally reserved the whole weekend for getting that fixed.

SerhiiPok commented 2 years ago

wow, congratulations!! it's difficult to overcome frustration when things do not work due to some low-level stuff, but when they do start working - that's a great feeling.. :)