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

Load file resource when used in a modular runtime image application. #16

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

renaudberube
Copy link

@renaudberube renaudberube commented Feb 17, 2022

This PR adds the ability for the library to load file resource (not directory though) when it is run in a modular runtime image application that was created with JLink, using this plugin.

Because this library is not modular, it is merged into a single jar and ends up in the application main module. The relative path to resources stay the same but since they are now packaged within the "modules" file in the image, you have to use ClassLoader.getResourceAsStream.

The changes in this PR should not change the way this library behaves. All existing tests are passing.

You can find an example of a modular runtime image app using it at example

@renaudberube renaudberube changed the title Load file resource when using in a modular runtime image application. Load file resource when used in a modular runtime image application. Feb 17, 2022
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

Successfully merging this pull request may close these issues.

None yet

1 participant