Minecraft Server won’t Run Java 8

OS Name/Version: Ubuntu 20.04

Product Name/Version: Minecraft Java Edition, FTB (new source), University 1.16 (1.4.0)

Problem Description:

Server fails to start, generates error code below. Googling indicates that this error can be solved by running Java 8 with this server type, but selecting Java 8 from the menu and configuring OS to use Java 8 do not alter startup readout from AMP stating Java 17

Console output shown below.



ModLauncher running: args [–gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 36.2.22, --fml.mcpVersion, 20210115.111550, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge, nogui]

ModLauncher 8.0.9+86+master.3cf110c starting: java version 17.0.1 by Debian



Exception in thread “main” java.lang.IllegalAccessError: class cpw.mods.modlauncher.SecureJarHandler (in unnamed module @0x2f529dae) cannot access class sun.security.util.ManifestEntryVerifier (in module java.base) because module java.base does not export sun.security.util to unnamed module @0x2f529dae

at cpw.mods.modlauncher.SecureJarHandler.lambda$static$1(SecureJarHandler.java:41)

at cpw.mods.modlauncher.api.LamdbaExceptionUtils.uncheck(LamdbaExceptionUtils.java:95)

at cpw.mods.modlauncher.SecureJarHandler.

Steps to reproduce:

  • Install Minecraft Instance
  • Configure Instance to Run FTB (new source) University 1.16 (1.4.0)
  • Scan for new Jars
  • Select forge-1.16.5-36.2.22.jar
  • Attempt to start server

Actions taken to resolve so far:

Recreated Instance
Set AMP to use Java 8
Set system default to Java 8
Attempted use of other .jar options (resulted in functional, but unmodded server)

check version of mod maybe paper version / spigot not forged version of plugin also seems like plugin requires java 17

So I had this problem where I needed java 17, I just installed java 17 on my system, gave it a reboot and it fixed the issue. If you think you have java 8 installed and it is not working you might have jre8 (java runtime environment 8) which is different from jdk8 (java development kit 8. Make sure you are using jdk8 as minecraft uses the jdk packages instead of the jre packages of java.

Maybe I’m reading the startup wrong, but the console appears to say that the server is currently starting with Java 17 (jdk) even though I have 8 (jdk) selected. I originally tried to run the server with 17 (jdk) selected but got the above error. My understanding from google is that FTB University is based on MC 1.16.5, which does not support Java 17.

Within AMP, change the java version to something else, then back to the one you intended to use.