How to run an app headless?

Johan Vos johan.vos at gluonhq.com
Fri Jun 9 07:29:40 UTC 2023


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/20230609/99e03cc5/attachment.htm>


More information about the openjfx-dev mailing list