<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/testing-lottie4j-javafx-animations-in-github-actions-without-a-display-javafx-26-headless-to-the-re-pzcfpoych" -->

---
title: Testing Lottie4J JavaFX Animations in GitHub Actions...
description: JavaFX 26 introduced a headless glass platform that enables running JavaFX rendering tests in CI environments without a display. This post walks through how...
canonical: https://daily.dev/posts/testing-lottie4j-javafx-animations-in-github-actions-without-a-display-javafx-26-headless-to-the-re-pzcfpoych
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Testing Lottie4J JavaFX Animations in GitHub Actions Without a Display: JavaFX 26 Headless to the Rescue | daily.dev
og:description: JavaFX 26 introduced a headless glass platform that enables running JavaFX rendering tests in CI environments without a display. This post walks through how...
og:url: https://daily.dev/posts/testing-lottie4j-javafx-animations-in-github-actions-without-a-display-javafx-26-headless-to-the-re-pzcfpoych
og:image: https://api.daily.dev/og/posts/pzcFPoych.png
og:image:alt: Testing Lottie4J JavaFX Animations in GitHub Actions Without a Display: JavaFX 26 Headless to the Rescue
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Testing Lottie4J JavaFX Animations in GitHub Actions Without a Display: JavaFX 26 Headless to the Rescue

**[WebTechie](https://daily.dev/sources/webtechie)** · 7 min read · 1 upvotes · 0 comments

## Summary

JavaFX 26 introduced a headless glass platform that enables running JavaFX rendering tests in CI environments without a display. This post walks through how the Lottie4J project used this feature to enable a previously disabled GitHub Actions test that compares JavaFX animation output against JavaScript reference screenshots. The solution uses a Maven profile that upgrades JavaFX to version 26 and Java to 25 only for the test run, while keeping the library itself on Java 21/JavaFX 21. Key JVM flags needed are -Dglass.platform=headless and --enable-native-access=javafx.graphics. The approach eliminates the need for Xvfb or Docker display tricks, and enables pixel-level regression testing of Lottie animation rendering on every CI push.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://webtechie.be/post/2026-04-20-lottie4j-unit-test-with-headless-javafx/>

## Similar posts on daily.dev

- [Closing the Visual Gap Between the Official Lottie Webplayer and Lottie4J · webtechie.be](https://daily.dev/posts/closing-the-visual-gap-between-the-official-lottie-webplayer-and-lottie4j-webtechie-be-3m5zp43sg) · WebTechie · 5 upvotes · 0 comments

---

Tags: [#java](https://daily.dev/tags/java), [#github-actions](https://daily.dev/tags/github-actions), [#maven](https://daily.dev/tags/maven)

[View this post on daily.dev](https://daily.dev/posts/testing-lottie4j-javafx-animations-in-github-actions-without-a-display-javafx-26-headless-to-the-re-pzcfpoych)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Testing Lottie4J JavaFX Animations in GitHub Actions Without a Display: JavaFX 26 Headless to the Rescue","url":"https://daily.dev/posts/testing-lottie4j-javafx-animations-in-github-actions-without-a-display-javafx-26-headless-to-the-re-pzcfpoych","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/testing-lottie4j-javafx-animations-in-github-actions-without-a-display-javafx-26-headless-to-the-re-pzcfpoych"},"datePublished":"2026-04-20T06:07:37.497Z","dateModified":"2026-04-20T06:08:07.645Z","description":"JavaFX 26 introduced a headless glass platform that enables running JavaFX rendering tests in CI environments without a display. This post walks through how...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/408da4857ca0dd5650c267191ca42cb9?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/408da4857ca0dd5650c267191ca42cb9?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"WebTechie","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"WebTechie","logo":"https://media.daily.dev/image/upload/s--Q98Q0_9X--/f_auto,q_auto/v1774960848/logos/webtechie?_a=BAMAMiWQ0","url":"https://daily.dev/sources/webtechie"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/testing-lottie4j-javafx-animations-in-github-actions-without-a-display-javafx-26-headless-to-the-re-pzcfpoych","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"java,github-actions,maven","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"WebTechie","item":"https://daily.dev/sources/webtechie"},{"@type":"ListItem","position":3,"name":"Testing Lottie4J JavaFX Animations in GitHub Actions Without a Display: JavaFX 26 Headless to the Rescue"}]}
```

