Skip to content

Building fails on Windows due to "Unsupported class file major version 61" #1299

@willplatt

Description

@willplatt

Attempted to build on Windows 10 and had the same error both with command prompt and git bash:

>gradlew.bat demos
FAILURE: Build failed with an exception.

* Where:
Settings file '[project dir]\settings.gradle'

* What went wrong:
Could not compile settings file '[project dir]\settings.gradle'.
> startup failed:
  General error during conversion: Unsupported class file major version 61

  java.lang.IllegalArgumentException: Unsupported class file major version 61

I was originally using Java 17 but tried a few different versions to no avail. When I tried using Gradle 9.1.0 instead I appeared to get further but had another problem:

An exception occurred applying plugin request [id: 'org.openjfx.javafxplugin', version: '0.0.13']
> Failed to apply plugin 'org.openjfx.javafxplugin'.
   > Could not create an instance of type org.openjfx.gradle.JavaFXOptions.
      > org/gradle/util/VersionNumber

I was able to remove that error message by changing the plugin version to 0.1.0 in richtextfx/build.gradle (changing it elsewhere wasn't necessary), but then there was another error:

FAILURE: Build failed with an exception.

* Where:
Build file '[project dir]\richtextfx\build.gradle' line: 54

* What went wrong:
A problem occurred evaluating project ':richtextfx'.
> Could not create task ':richtextfx:jar'.
   > Could not get unknown property 'convention' for task ':richtextfx:jar' of type org.gradle.api.tasks.bundling.Jar.

I don't understand this error, as the string "convention" doesn't appear anywhere in the project. But based on issue 1281 I tried using Gradle 8.5 (by changing the distributionUrl) and then everything went smoothly without any of the prior changes needed. Therefore, I'll make a pull request for this change.

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