The headless platform also requires you to use the "sw" pipeline, so: `java -Dglass.platform=Headless -Dprism.order=sw`. Note that build.gradle does this when running the headless tests, e.g., when -PHEADLESS_TEST=true or when running javafx.web tests regardless:

        // Run web tests in headless mode
        systemProperty 'glass.platform', 'Headless'
        systemProperty 'prism.order', 'sw'

It might be reasonable to consider forcing "sw" if glass.platform=Headless, but that would require PrismSettings to look for this glass property as Prism is initialized first.

-- Kevin


On 10/8/2025 1:00 AM, Marius Hanl wrote:
Hi,

I recently tried to write headless tests by utilizing the new headless platform.
First of all, works great!

I noticed that the CI still tries to load shared libraries. This will fail in 
the CI with the following message:

Loading library prism_es2 from resource failed:
java.lang.UnsatisfiedLinkError: 
/root/.openjfx/cache/26-ea+7/amd64/libprism_es2.so: Error loading shared 
library libX11.so.6: No such file or directory (needed by 
/root/.openjfx/cache/26-ea+7/amd64/libprism_es2.so)
java.lang.UnsatisfiedLinkError: 
/root/.openjfx/cache/26-ea+7/amd64/libprism_es2.so: Error loading shared 
library libX11.so.6: No such file or directory (needed by 
/root/.openjfx/cache/26-ea+7/amd64/libprism_es2.so)
     at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
     at 
java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:321)
...


The tests still run and work regardless, but I wonder if this can be disabled. 
If not, if that's a feasible enhancement for headless tests?
Thoughts?

-- Marius

Reply via email to