Modular Applications - Regression

Kustaa Nyholm kustaa.nyholm at sparetimelabs.com
Mon Jan 14 15:13:03 UTC 2019


I'm very new to modular stuff but I've just experimented with my java6 application that I've been bringing to this century by trying to use jdk11.

During these rehearsal I've been using various versions of javapackager, jpackager and jpackage. jpackager (from Java8) seems to build a .app that does not include the whole +200 MB JDK and still works. More over, first attempts complained about missing modules at runtime and started to work when those were specified in build time (my .app is now around 80MB) so I guess the modularity really works for my case and I've paid absolute no attention to making my own code/jar whatever modular. 

Just mentioning this as a point of reference. 

The reason I mention the all this experimenting is that possibly the jar of my code that I'm linking with has been somehow 'modularised' by some tool this chain of tools that I've been using. Or not.

cheers Kusti
 



> On 14 Jan 2019, at 17.03, Scott Palmer <swpalmer at gmail.com> wrote:
> 
> Hi, 
> 
> I’ld like to confirm something, because I see suggestions to “build X as a modular app” or “build as a modular jar” and I’m wondering if I’m missing something.  These options don’t seem to be practical for most applications.
> 
> Does this not require ALL dependencies - down the entire dependency chain, including every transitive dependency, to be 100% modular?
> 
> I don’t know of many applications outside of those included in the JDK (where dependencies are not an option) that this restriction actually applies to.  In fact since Java 11 there is a regression where applications that could be built as modular with JDK 9 & 10 no longer can be, because the java.activation module was removed and no modular replacement is available.  Many dependency chains lead to java.activation.
> 
> Am I correct that this is the current state of things when trying to create a Java module?  I feel I must be missing something because I’m not seeing the expected complaints over the app-breaking regression of the removed modules no longer being available as modules.  Is it just that nobody is making modular apps yet?
> 
> Regards,
> 
> Scott
> 
> 
>> On Jan 14, 2019, at 9:34 AM, Andy Herrick <andy.herrick at oracle.com> wrote:
>>> 
>> you can avoid that by running jlink first, and creating a minimal jdk-11.0.1 runtime image for your app, or by building EazyCNC.jar as a modular app (or as a modular jar which you may have already done for all I know)
> 



More information about the core-libs-dev mailing list