Dependencies on java.desktop
Tom Schindl
tom.schindl at bestsolution.at
Tue May 18 17:45:02 UTC 2021
Uff - I'd like to revisit this topic. As I did some jlink stuff for our
applications adding java.desktop once more bugged me.
I guess the first thing to do is to file a JIRA-Ticket but it really
starts to bug me to include java.desktop although I don't plan to use
printing (and I guess > 90% of the JavaFX don't use the printing API
either but produce PDFs or whatever) and Java-Beans.
Tom
Am 27.03.18 um 14:26 schrieb Kevin Rushforth:
> 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
> 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).
>
> -- Kevin
>
>
> Tom Schindl wrote:
>> Hi,
>>
>> Anyone else has an opinion on that? Is require static the way to go?
>>
>> Tom
>>
>> On 21.03.18 23:23, Tom Schindl wrote:
>>> Hi,
>>>
>>> I always thought the JavaFX-Codebase should be able to run with just the
>>> java.base module but I was browsing the codebase a bit and was suprised
>>> (or rather shocked) that even the base-module requires java.desktop.
>>>
>>> If I get it correct this because of the java.beans (provided by the
>>> adapters) stuff is found in there. Why hasn't the requires there not
>>> defined as:
>>>
>>> requires static java.desktop;
>>>
>>> Tom
>>>
More information about the openjfx-dev
mailing list