Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WalletTemplate built with :installDist target fails with "JavaFX runtime components are missing" error #3326

Open
msgilligan opened this issue Nov 18, 2023 · 1 comment

Comments

@msgilligan
Copy link
Member

This is the full error

./wallettemplate/build/install/bitcoinj-wallettemplate/bin/bitcoinj-wallettemplate
Error: JavaFX runtime components are missing, and are required to run this application

If I use the Zulu 21.0.1.fx-zulu version of Java then it works correctly, but the build should probably be fixed so this works correctly on a typical JDK. (I discovered this while trying to use the :installDist target to build and install wallettemplate with Nix)

@msgilligan
Copy link
Member Author

msgilligan commented Dec 15, 2023

I've been able to work around this issue when using Nix, by using the following:

jdk = pkgs.jdk17.override {
             # enabling JavaFX in the JDK allows `nix run .#wallettemplate`  to work correctly.
             # This is because the `bitcoinj-wallettemplate:installDist` Gradle task does
             # not set up the Module Path correctly for JavaFX to be loaded from a Maven JAR.
             enableJavaFX = true;
         };

See #3334 for the WIP PR that includes this workaround.

But it still would be nice if installDist built something that would work with a standard JDK (i.e. one that doesn't include JavaFX)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant