I compile all my projects in 1.8. Example:
This should work with Java 8. If this is the way your pom is currently setup, then you probably just need to download the SDK.
Locally:
File -> Project Structure -> Project SDK
If the SDK version isn't compatible with java 1.8, you'll see a lot of errors
You should be able to use Java 1.8 with Amazon Coretto Java 8. That would be a change on the machine to install that SDK and use it, probably. I'd imagine it would be on some sort of build server. Do you use
Jenkins?