Few questions

Michał Zegan webczat_200 at poczta.onet.pl
Sat Nov 26 11:53:04 UTC 2016


I know that osgi sits on top of jigsaw, but osgi was created when jigsaw
did not exist, so it is itself a module system for java that does not
need jigsaw.
So then it would probably look like a module system on top of another
module system... seems weird to me.
What should I do when I would like to write a new application that would
be modular? Use jigsaw directly or not?

W dniu 26.11.2016 o 12:41, Jochen Theodorou pisze:
> On 25.11.2016 23:21, Michał Zegan wrote:
>> Well, I specifically mean setAccessible usage between modules.
> 
> If your code really requires setAccessible it is going to break with
> jigsaw. And there is no way to for example emulate that on java.base
> without using command line arguments intended only for the transition to
> "real" modules.
> 
>> Another question that comes to mind after reading some things: what
>> about relation of jigsaw and osgi?
> 
> they are different beasts
> 
>> Is jigsaw going to replace osgi?
> 
> No
> 
>> Well, what I exactly mean is, I know you try to make jigsaw and osgi
>> work together.  I just mean, is jigsaw module system going to work in
>> such a way that you would be able to use it for modularizing
>> applications without osgi, assuming that either the app does not use
>> dynamic services, or it does, but there would be a service manager built
>> on top of jigsaw?
> 
> No. OSGI sits on top of jigsaw.
> 
>> Specifically, what about multiple versions of the same module per jvm
>> and multiple packages with the same name per jvm (either private, or
>> exported non transitively)...
> 
> multiple versions of the same module can be done... kinda... Just not at
> compile-time. You will be required to handle all the layers and read
> edges yourself. At compile-time jigsaw does not allow multiple versions
> of the same module - not even two distinct modules that use the same
> packages (I forgot if that was really only for the exported packages, or
> if the non-exported count as well, or if them counting as well was/is a
> bug).
> 
> bye Jochen



More information about the jigsaw-dev mailing list