
I forgot to specify the correct version for Run/ Debug Configurations -> Build and run to Java 18 instead of Java 17:Īs it was compiled with a newer Java version, but running on the older one. Project Structure -> Platform Settings -> SDKs:.Project Structure -> Project Settings -> Modules:.


Java(TM) SE Runtime Environment (build 18.0.1.1+2-6) I had project settings regarding to Java 18: This version of the Java Runtime only recognizes class file versions up to 61.0Īfter upgrading the project from Java 17 to Java 18. Has been compiled by a more recent version of the Java Runtime (class file version 62.0), I've reproduced on Windows 10 the similar issue in format like: Error: LinkageError occurred while loading main class.
