0

I am currently working on a project for University in Java. In the template for the project we already have a lot of Classes and configurations given. However, if I try to run the code, my build fails and it gives me the following error Message:

java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found

on top of that, I get the following warning:

Unsupported JavaFX configuration: classes were loaded from 'unnamed module @4bde3f8a'

I feel like it has something to do with the gradle configuration, so I include my build.gradle (That I was given by my university):

plugins {
    id 'application'
    id 'org.openjfx.javafxplugin' version '0.0.9'
}

apply plugin: 'java'
sourceCompatibility = 17
version = '1.0.0'
compileJava.options.encoding = 'UTF-8'


repositories {
    mavenCentral()
}

javafx {
    version = "17"
    modules = ['javafx.controls']
}

dependencies {
    implementation 'org.json:json:20220924'
    implementation 'org.apache.commons:commons-lang3:3.12.0'
    implementation 'org.openjfx:javafx-graphics:17:mac'
}

sourceSets {
    main {
        java {
            srcDir 'src'
        }
    }
    test {
        java {
            srcDirs = []
        }
    }
}
jewelsea
  • 150,031
  • 14
  • 366
  • 406
finnjgr
  • 207
  • 1
  • 9
  • Did you already google your problem? I also found the exception here: https://stackoverflow.com/questions/65737055/javafx-web-11-error-initializing-quantumrenderer-no-suitable-pipeline-found – Jaster_Master Jan 17 '23 at 15:46
  • Yes, I tried what was suggested in that Post (Adding org.openjfx:javafx-graphics:17:mac to my implementation) However, that didn't make a difference unfortunately. – finnjgr Jan 17 '23 at 16:15
  • 2
    start here: https://openjfx.io/openjfx-docs/ – kleopatra Jan 17 '23 at 16:49
  • Here I have a working gradle.build file with kotlin as DSL: https://github.com/Jaster-Master/JavaFX-Gradle-Template/blob/main/build.gradle.kts - If this does not help you, there must be some other problem with a local javafx sdk on your device or something else. Which OS do you use? – Jaster_Master Jan 17 '23 at 18:01
  • 1
    @jewelsea Thank you that was the problem. I upgraded to version 19 and everything is running smoothly – finnjgr Jan 18 '23 at 09:36

1 Answers1

4

Use later versions

JavaFX support for M1/M2 Macs is unreliable in some JavaFX 17 distributions.

Instead, use JavaFX 19 or greater, same for the Java runtime. As of 2023-08, JavaFX (OpenJFX) version 20 is current, with 21 planned for next month. See Downloads page. JavaFX releases occur on approximately the same cadence as OpenJDK.

The mac classifier is wrong if it is an M1 Mac. It is better not to supply a classifier unless you know what architecture you are using, and even then, I would avoid it.

Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154
jewelsea
  • 150,031
  • 14
  • 366
  • 406