On 27.03.18 14:26, Kevin Rushforth wrote: > Hi Tom, > > Yes, this is an unfortunate dependency. It is "only" an implementation > dependency, meaning that nothing in the public API depends on > java.desktop (which is why we don't "requires transient java.desktop"), > so it should be possible to remove this dependency in the future. As > noted, it is only there because Java Beans is part of the java.desktop > module. > > In the interim, your suggestion of "requires static java.base" could be > the way to go. It would need a spec change to the JavaFX beans adapter > classes documenting that they would throw an > UnsupportedOperationException if java.desktop was not present at
How can that happen. To write a JavaBean the consumer of the API by definition has to have java.desktop as a dependency how else would he've been able to construct the bean? > runtime, along with a recommendation that applications needing that > functionality should add "requires java.desktop" to their own > module-info.java. > > Note that this would only help non-graphical JavaFX applications that > use javafx.base for its collections, properties, and bindings, since > javafx.graphics requires java.desktop in a way that currently cannot > easily be made optional (not without reimplementing printing support > anyway). > I understand but I guess here one could do a spec change to define that printing is only available if one add java.desktop yourself as a dependency. Looking at printing I might be better moved to its own module, the problem with JPMS is that you can't move stuff after having released the API module, I wished instead of "require module" JPMS would have used "import package". Tom