Minecraft on Windows Server 2019

OS Name/Version:
Windows Server 2019

Product Name/Version: (Always use the full version number - not ‘Latest’)
v2.3.2.4

Problem Description:
installed latest java (8u321) on host and then tried to add a Minecraft Java edition and get this error.

Error: A JNI error has occurred, please check your installation and try again

06:31:16

Exception in thread "main" java.lang.UnsupportedClassVersionError: net/minecraft/bundler/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

Actions taken to resolve so far:
only checked logs

You’ve not installed the latest version of Java. Java 8 is ancient - you should install this version: https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.2%2B8/OpenJDK17U-jdk_x64_windows_hotspot_17.0.2_8.msi

Then restart AMP, and check the Java version in AMP to 17.

That’s right. You have to use an old Java for the server. The client include it’s own version of the old Java.
Thanks!

Only old servers use old versions of Java. Newer ones use the latest version.