jlayer icon indicating copy to clipboard operation
jlayer copied to clipboard

Request: Add module-info.java

Open taranion opened this issue 11 months ago • 5 comments
trafficstars

It would be helpful for applications using this library, if this library was a proper Java module. Usually it would be as simple as adding a suitable a module-info.java file.

taranion avatar Dec 12 '24 09:12 taranion

as i mentioned in #9, this is a hobby project.

i usually hack a method that is package protected creating a same package class like this. i afraid using module makes my programming life harder.

i'm not a commercial programmer but a hobby programmer, so i'm not interested in making programming strict.

umjammer avatar Dec 13 '24 14:12 umjammer

please anyone convince me that module is worth it

umjammer avatar Dec 14 '24 13:12 umjammer

First of all: I do not want to press you into anything, far from it - I am using this for a hobby project myself.

In my experience having modules is the requirement, to make best use of todays packaging and release mechanisms like Jpackage or native compilation via GraalVM. Modules allow the packaged JVM to not include unsed code, leading to smaller footprint in installation (e.g. my 10 MB jar got blown up to a 300 MB installable, because of not having modules - with modules it was a 60 MB executable). In this case having modules is less about access restriction, but reducing package bloat.

And in the case of this project, you need to do nothing more than adding a module-info.java. If the projects you are using this are not modular applications themselves, it won't matter to you. But for those application who are modular, using non-modular libraries can be a dealbreaker.

But, as I said, I do not want to press you into a course you don't want to go. For my project, I could also fork this project and re-release it as a modular library under a different name - with the explicit disclaimer that I do not intend to take care of the project any further.

Regarding the projects worth: What I like about Jlayer is its simplicity and that it comes without a list of dependencies. That makes it the ideal candidate for my hobby project.

taranion avatar Dec 14 '24 13:12 taranion

I will look into this and send you a Pull Request. You can than decide if you want to use it or not.

taranion avatar Dec 14 '24 13:12 taranion

https://openjdk.org/jeps/511

modules are becoming increasingly important...

umjammer avatar Sep 29 '25 14:09 umjammer