cljfx

2024-09-16T15:44:58.312509Z

Hi, I'm having an issue on my ubuntu setup. I'm getting the following error:

Execution error (UnsupportedOperationException) at com.sun.glass.ui.gtk.GtkApplication/lambda$new$5 (GtkApplication.java:165).
Unable to open DISPLAY
This is when I try to compile the e01_basic.clj example. I installed libgtk4-dev. I have also installed zulufx22 jdk.

2024-09-17T12:02:10.885599Z

Yeah, I tried other jdks as well but consistently get this error. I'm normally on windows for work but when I work from home I prefer linux. I never had issues before. I must have done something to my ubuntu installation.

vlaaad 2024-09-17T12:18:44.665769Z

hmm could it be caused by your compositor?

vlaaad 2024-09-17T12:19:08.584329Z

if that’s the right term… I think I heard somewhere that javafx does not support wayland or something like that…

vlaaad 2024-09-17T12:20:43.187329Z

I’d google something like javafx linux Unable to open DISPLAY if I were you

2024-09-17T12:49:37.860709Z

Yeah, I was doing that. I'll have to try again some time, but it won't be for a while. Thanks for your help.

2024-09-16T16:04:50.238539Z

A bit more of the stack trace:

1. Caused by java.lang.UnsupportedOperationException
   Unable to open DISPLAY

       GtkApplication.java:  165  com.sun.glass.ui.gtk.GtkApplication/lambda$new$5
     AccessController.java:  319  java.security.AccessController/doPrivileged
       GtkApplication.java:  163  com.sun.glass.ui.gtk.GtkApplication/<init>
   GtkPlatformFactory.java:   40  com.sun.glass.ui.gtk.GtkPlatformFactory/createApplication
          Application.java:  145  com.sun.glass.ui.Application/run
       QuantumToolkit.java:  290  com.sun.javafx.tk.quantum.QuantumToolkit/startup
         PlatformImpl.java:  292  com.sun.javafx.application.PlatformImpl/startup
             Platform.java:  116  javafx.application.Platform/startup
              platform.clj:   12  cljfx.jdk.platform/initialize

vlaaad 2024-09-17T06:56:55.284449Z

what’s a zulufx jdk?

vlaaad 2024-09-17T06:57:04.089329Z

is it something that bundles javafx?

vlaaad 2024-09-17T06:57:49.232159Z

that might cause issues, since jdk 11 javafx is a normal maven dep, so no need to use a jdk that bundles it.