-
Notifications
You must be signed in to change notification settings - Fork 970
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
Add a module info #803
Comments
Ethan I noticed this myself when I was planning on adding it as a config option to: https://github.com/jstachio/rainbowgum They probably cannot do this without a major version change and will likely break everyone I think because they will no longer be able to do the default loading of resources from the jar (actually it probably doesn't even work now if your application is modular). This is because the module will block accessing of resources named That is They should use the So they would need to try A better solution might be to use the |
I thought module resources were only encapsulated if they had a path prefix that matched a package with classes in it? Do you have a good resource on the resource rules @agentgt ? |
No I don't sadly. But you can read this answer on SO (see who is answering the question for officialness). https://stackoverflow.com/questions/45166757/loading-classes-and-resources-post-java-9
So obviously The hyphen rule Now if resource.conf was in a package it would work but you would have to
I'm not really sure I follow that or how that would work. How would the module loader know about that? But I suppose what you are asking is if there is a resource at the root not in a directory it should always be open and for that I have found through experimentation not to be the case at all unless your module is not a module or something. That is I had similar experience as this comment: https://stackoverflow.com/questions/45166757/loading-classes-and-resources-post-java-9#comment133075438_67852944 |
I guess according to the doc |
Yeah i remember learning that from this talk https://www.youtube.com/watch?v=4fevIDAxQAM |
I guess I should just setup a project to see how it comes up but there are lots of caveats switching from Automatic-Module-Name to module-info. It changes the visibility graph. Automatic modules can basically see everything. What I think has happened for me with root resources (e.g. Either way you go from being able to always see it as an automatic module to possibly not seeing it when you switch to In theory the What I know for sure does not work despite various conflicting doc is that you cannot have a directory in your jar that has a package like name (e.g no |
Adding a module info would let projects using this use jlink to package their app.
(every dep needs a module-info for that to work)
The text was updated successfully, but these errors were encountered: