aliengamer90
aliengamer90

Reputation: 91

Error: The compiler compliance specified is 1.8 but a JRE 15 is used

So I got an error in eclipse saying "The compiler compliance specified is 1.8 but a JRE 15 is used", and when I try to change the Java compiler, eclipse said When selecting 1.8 compliance, make sure to have a compatible JRE installed and activated(currently 15). Configure the 'Installed JREs' and Execution Environments, or change the JRE on the Java Build Path

And when I go to the Java build path the JRE there is 1.8 instead of 15. And after that I went to Execution environments and saw JavaSE - 15 is the only one that has [perfect match] in the compatible JREs box, but if I try to add Java SE - 1.8, there is a new warning, something like Build path specifies execution environment JavaSE - 1.8, there are no JREs installed in the workspace that are strictly compatible with this environment

and after that, I have no idea what to do...

Upvotes: 8

Views: 30655

Answers (1)

WJS
WJS

Reputation: 40044

In the preferences do you see something like this - Windows->Preferences->Java->Installed JREs

enter image description here

Either ensure the proper JRE is there or go to the Windows->Preferences->Java->Compiler and make sure your compliance setting matches.

Upvotes: 12

Related Questions