Alan.Bateman at oracle.com
Sat Jan 21 20:55:38 UTC 2017
On 21/01/2017 14:00, Michał Zegan wrote:
> Is java.desktop now divided in separate parts, or are there plans to do
> so? Because actually the whole point of your application having no
> unneeded dependencies is broken if you want java.beans, and suddenly get
> the whole desktop apis that are probably large, with their dependencies.
The "beans problem" was explored at length a few years ago. Yes, there
are a handful of classes that are useful for some headless libraries and
applications but there are classes in the java.bean's API that are tied
to types in java.awt and java.applet. Splitting the java.beans package
between modules was an option in the early exploration phase of Project
Jigsaw but the current design is a lot simpler and doesn't support that.
So yes, if your module needs types in the java.beans or
java.beans.beancontext packages then you need to `requires
java.desktop`. It is a big module but its size will only be concern if
you are creating you own run time images with `jlink. I'm not aware of
any effort to split the module further. It's not clear that it would be
worth it given the tight internal coupling between some areas and the
likely compatibility issues involved in breaking some of the cycles.
More information about the jigsaw-dev