When switching Java versions from 8 to 11 (or 11 to 8) in IntelliJ, or during initial setup, if you miss some settings, your server build and run might not work as intended. This document provides guidelines to reduce this trial and error and make checking out your development environment as easy and comfortable as possible.
GameAnvil uses AdoptOpenJDK. There are two Java versions supported: 8 and 11. Users can configure their development environment by installing the JDK of their choice. We suggest using AdoptOpenJDK if for no other reason.
Go to File -> Project Structure
Go to Project Settings -> Project and set "Project SDK" and "Project language level" to the same (8 or 11)
After selecting your application, check the JRE version and set it to the same value as the JDK version you set earlier.