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

Adding example how to include extra module when executing jlink goal #149

Open
jan-tosovsky-cz opened this issue Jan 18, 2022 · 1 comment

Comments

@jan-tosovsky-cz
Copy link

In my JavaFX app I do some ZIP processing, but hit java.nio.file.ProviderNotFoundException with jlink created runtime because jdk.zipfs dependency was not properly auto-detected.
https://stackoverflow.com/questions/57846630/java-nio-file-providernotfoundexception-with-jlink-created-runtime
While the solution is clear, I have no idea if --add-modules jdk.zipfs can be accomplished by the plugin.
I'd be grateful to add an example for this into README.md or clearly state this is not possible. It would help others in the future.

@jan-tosovsky-cz
Copy link
Author

Not sure if this is best solution, but I simply added jdk.zipfs to my module-info.java as required module:

    requires javafx.controls;
    requires javafx.fxml;
    requires java.xml;
    // jdk.zipfs module is not auto-detected by default so adding explicitly here
    requires jdk.zipfs;

It is then detected by jlink and properly included in the final runtime image.

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