We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f79299 commit 64ef5aaCopy full SHA for 64ef5aa
1 file changed
src/test/java/com/example/HelloModelTest.java
@@ -19,8 +19,13 @@ class HelloModelTest {
19
20
@BeforeAll
21
static void setupJavaFX() {
22
- if (!Platform.isFxApplicationThread()) {
23
- Platform.startup(() -> {});
+ try {
+ if (!Platform.isFxApplicationThread()) {
24
+ Platform.startup(() -> {});
25
+ }
26
+ } catch (UnsupportedOperationException e) {
27
+ System.out.println("Headless environment detected – skipping JavaFX startup");
28
+ } catch (IllegalStateException e) {
29
}
30
31
0 commit comments