Headless Tests in CI try to load shared libraries
Kevin Rushforth
kevin.rushforth at oracle.com
Wed Oct 8 11:53:45 UTC 2025
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20251008/c221c24c/attachment-0001.htm>
More information about the openjfx-dev
mailing list