I have downloaded and installed the forge server 1.16.5.
In the installation folder the vanilla Minecraft server runs perfectly.
In the same folder the forge server says it is trying to launch Java version 16.
Java 8 is the only version installed.
Curiously, the error message is exactly the same if I uninstall Java entirely.
Essentially, this happens (along with a stack trace):
[16:48:12] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 36.2.20, --fml.mcpVersion, 20210115.111550, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge]
[16:48:12] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 8.0.9+86+master.3cf110c starting: java version 16.0.1 by Oracle Corporation
Exception in thread "main" java.lang.IllegalAccessError: class cpw.mods.modlauncher.SecureJarHandler (in unnamed module @0x40f9161a) cannot access class sun.security.util.ManifestEntryVerifier (in module java.base) because module java.base does not export sun.security.util to unnamed module @0x40f9161a
Any ideas?
Andy