Skip to content

Java 21 not working, release was build with java 23 #198

Description

@einfachBlu

I am using Java 21 and i cant use the latest 2025.x version as it seems to have java 23 required. When i change back to 2024.x it works with java 21.

Not working with java 21

jproVersion = 2025.3.1
javafxVersion = 24.0.2
Caused by: java.lang.UnsupportedClassVersionError: javafx/scene/Node has been compiled by a more recent version of the Java Runtime (class file version 67.0), this version of the Java Runtime only recognizes class file versions up to 65.0
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	at com.jpro.boot.SpecialClassLoader.findClass(SpecialClassLoader.java:24)

Working with java 21

jproVersion = 2024.4.1
javafxVersion = 21.0.5

Activity

  1. FlorianKirmaier commented on Oct 16, 2025

    @FlorianKirmaier
    Contributor

    How do you set the JavaFX Version?
    You have to set the JavaFX Version in the gradle/maven plugin.
    JavaFX25 requires JDK23 or higher - which is the default for JPro.

    If you set javafxVersion = 24 in the plugin,
    than it should work.

  2. einfachBlu commented on Oct 16, 2025

    @einfachBlu
    Author

    I have set the javafxVersion in the gradle.properties which is then used for all things - javafx plugin, dependencies etc.
    But I am wondering, in the version it says that the requirement is Java 21, not java 23

  3. FlorianKirmaier commented on Oct 17, 2025

    @FlorianKirmaier
    Contributor

    In the build.gradle, you have to configure the JavaFX version, which JPro is using.
    You can do it like the following:

    jpro {
        port = 8082
        javafxVersion = "23"
    }
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions