AlwaysNeedingHelp
AlwaysNeedingHelp

Reputation: 1945

UnsupportedClassVersionError on Gradle build with only JDK 11 installed?

Getting this error when trying to run gradle build.

org/openjfx/gradle/JavaFXPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Now there's tonnes of similiar questions on StackOverFlow about this, but every suggestion doesn't work that I've found:

Running java -version results in:

enter image description here

I don't understand what's happening. I can't see how it's using JRE 8 when I only have JDK 11. I'm at a total loss here.

Upvotes: 5

Views: 3899

Answers (1)

PHPirate
PHPirate

Reputation: 7572

It may be that the Gradle JVM is still set incorrectly. If you are using IntelliJ, you can change this by going to File > Settings > Build, Execution, Deployment > Build Tools > Gradle and change Gradle JVM to 11 (or to the Project JDK).

Upvotes: 5

Related Questions