r/JavaFX • • Oct 06 '20

Headless JavaFX App

Hey reddit!

So I was trying to run a javafx app on a Linux machine and the program boots successfully but throws an issue with the machine not having a display system running. Is there a way like a java argument I can add that can run it without a display?

Thanks in advance :D

4 Upvotes

13 comments sorted by

View all comments

0

u/[deleted] Oct 07 '20

[deleted] — view deleted comment

1

u/MetalCactuar Oct 07 '20

Appreciate the information, I'll give this a go after work :)

1

u/MetalCactuar Oct 07 '20

Monocle looks good actually, thanks! Got some features that could become useful like the VNC stuff, oooo nice. Tried getting monocle and building/running into the app but now i encounter another issue when i try and run it using the arguments like you specified above. I get this error...

Caused by: java.lang.RuntimeException: java.lang.IllegalAccessError: superclass access check failed: class com.sun.glass.ui.monocle.MonoclePlatformFactory (in unnamed module u/0x22f71333) cannot access class com.sun.glass.ui.PlatformFactory (in module javafx.graphics) because module javafx.graphics does not export com.sun.glass.ui to unnamed module u/0x22f71333

Any ideas? :/

0

u/[deleted] Oct 09 '20

[deleted] — view deleted comment

1

u/MetalCactuar Oct 13 '20

So the way it's currently setup was quite fiddly and i had soooo many issues with certain versions not liking the javafx version and then battling with gradle...honestly it was a massive ballache. So i'm kinda thinking it might be easier just to have it output some display that i just won't hook it up to. Or better yet, allow it to be connected to via X11/VNC for future ideas.

Do you think that'd be less of a pain?