Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] Is there interest in supporting modules with "Package required libraries into generated JAR"

Hi,

I recently created issue eclipse.jdt.ui#2424 (https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/2424) and I wanted to know whether there is interest in this.

Essentially, when exporting a Runnable JAR with "Package required libraries into generated JAR" on a modular project, the resulting JAR cannot be used on the modulepath because the module-info.class is in the exported JAR requires the dependency modules to be present and also that the JAR in JAR loader doesn't support modules. Would there be interest in changing this (changing the ClassLoader to support modules and also change the packaging to put the application code in a JAR _if_ modules are used but the latter would mean that such a JAR couldn't be used as a library I guess)? More details on my idea on how that could work are in the issue. Are there even people using "Package required libraries into generated JAR"?

I think it would "make sense" for the "Package required libraries into generated JAR" to support modules or at least show a warning or error if a module-info.class is present (since it would generate a JAR that couldn't be used on the modulepath).

To the question of whether I would contribute to it, the answer is "Maybe at some point" but only if there isn't any interest, I don't see much of a point in doing it. If there is some interest (if people would like to have this change), I might write a PR at least for changing the JAR in JAR loader (but no promises!) at some point but probably not that soon. I don't really want to make this change just to get it rejected due to being too disruptive (especially changing the packaging to use nested JARs for the application if a module-info.class is present - i.e. part 2. in the suggestion in the issue I created) in that component or similar.

Yours,
Daniel



Back to the top