0

I would like to use monocle with linux, for headless use in build system, but I don't see any way to get the linux-monocle version for versions above 17.0.6

Is it just forgotten? broken? or is there any other way to get it working?

I tried using the following parameters

-Djavafx.platform=linux
-Dheadless=true
-Dglass.platform=Monocle
-Dmonocle.platform=Headless
-Dprism.order=sw
-Djava.awt.headless=true

and I get an error saying that the platform is not initialized:

  Cause: java.lang.NullPointerException: Cannot invoke "com.sun.glass.ui.PlatformFactory.createApplication()" because the return value of "com.sun.glass.ui.PlatformFactory.getPlatformFactory()" is null
  at com.sun.glass.ui.Application.run(Application.java:146)
  at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:290)
  at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:293)
  at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:163)
  at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:659)
  at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:679)
  at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
  at java.base/java.lang.Thread.run(Thread.java:833)

my best guess on it after some investigation is that I should be using the linux-monocle platform but it is not released for 19.x versions for linux x64, and I'd really prefer to continue using the 19.x versions, that contain methods like map, flatMap which are really helpful.

jewelsea
  • 150,031
  • 14
  • 366
  • 406
  • If you look in the [maven central repository](https://repo1.maven.org/maven2/org/openjfx/javafx-graphics/), `linux-monocle` (which I also guess is x64) builds don't exist for major versions more recent than 17, same for the [gluon javafx download page](https://gluonhq.com/products/javafx/). It does exist for other linux architectures, eg `aarch64`. I don't know why this is. You might be able to [build the packages from source](https://github.com/openjdk/jfx), but perhaps there is a reason they are no longer built (I don't know). Really, this comment only confirms what you already observed. – jewelsea Feb 27 '23 at 21:08
  • Maybe try asking the [openjfx-dev](https://mail.openjdk.org/mailman/listinfo/openjfx-dev) mailing list. – jewelsea Feb 27 '23 at 21:11

0 Answers0