How to run an app headless?

Johan Vos johan.vos at gluonhq.com
Thu Mar 14 11:44:38 UTC 2024


Hi Craig,

If you want JavaFX with a headless platform, have a look at
https://github.com/openjdk/jfx-sandbox/tree/johanvos-headless and provide
feedback.

- Johan

On Thu, Mar 14, 2024 at 12:06 PM Craig Raw <craigraw at gmail.com> wrote:

> To pick up on this old thread - is a Linux x86-64 Monocle build a
> possibility for a future JavaFX release? AFAIK the last JavaFX release with
> this platform supported on Monocle was JavaFX 18.
>
> Thanks,
> Craig
>
> On Fri, Jun 9, 2023 at 9:30 AM Johan Vos <johan.vos at gluonhq.com> wrote:
>
>> The monocle classes are not included in the default
>> distributions/artifact. In our downloads on
>> https://gluonhq.com/products/javafx/ we have specific SDK's that include
>> the Monocle classes. Note that we currently don't have automated builds for
>> Linux x86-64, since we use a devkit compiled from JDK-alike sources, see
>> https://github.com/gluonhq/devtoolskit/ for more info. That devkit
>> unfortunately doesn't yet compile some of the native classes in monocle.
>>
>> The usecase where Monocle is used because users want to run an app
>> headless is something I see very often. And it works. However, Monocle
>> isn't really created for this, as it is more a solution for embedded
>> systems.
>> I think there is real value in a separate, small, first-class Glass
>> platform that works headless (at the same level as gtk/mac/win) and that is
>> explicitly targeting running apps in headless mode.
>>
>> - Johan
>>
>>
>>
>>
>> On Thu, Jun 8, 2023 at 8:07 PM Thiago Milczarek Sayão <
>> thiago.sayao at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I'm building javafx with:
>>> ./gradlew -PincludeMonocle build
>>>
>>> And trying to test with:
>>> java @/home/tsayao/jfx/build/run.args -Dglass.platform=Monocle
>>> -Dmonocle.platform=Headless -Dprism.order=sw WindowTest.java
>>>
>>> But it seems monocle was not included:
>>> java.lang.ClassNotFoundException:
>>> com.sun.glass.ui.monocle.MonoclePlatformFactory
>>>
>>> Any obvious mistake?
>>>
>>> -- Thiago
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240314/e4e25389/attachment.htm>


More information about the openjfx-dev mailing list