A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException

  • Tech Support section is for getting help with FTB related problems. If there's a repeatable issue that can be labeled as a bug, then please use the issue tracker for the pack or the app at GitHub issue trackers - If there's no repository for a pack that means that the pack is old and/or will not be updated. Bugs for older packs will not be fixed, unless they are critical.

AsylantenAnanas

New Member
Jan 18, 2021
3
1
4
I have already installed the newest java and downloaded the FTB Revelation Server Pack from the link on the FTB Website. Then i ran it and all the files where downloaded. When i now type ./start.sh this error is shown:

A problem occurred running the Server launcher.java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.run(ServerLaunchWrapper.java:70)
at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:34)
Caused by: java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap')
at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
... 6 more

This is my start.sh:
#!/bin/bash
echo "Do you agree to the Mojang EULA available at https://account.mojang.com/documents/minecraft_eula ?"
EULA=`read -n 1 -p "[y/n] "`
if [ "$EULA" = "y" ]; then
echo "eula=true" > eula.txt
fi
java -server -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -Xmx12288M -Xms4096M -jar forge-1.12.2-14.23.5.2846-universal.jar nogui

I would need help please. server is debian 10.
 

AsylantenAnanas

New Member
Jan 18, 2021
3
1
4
Use latest java 8 version

how can i get the older version? cause when i do java -version this is the output:
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-post-Debian-1deb10u2)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-post-Debian-1deb10u2, mixed mode, sharing)

How to get java version 8?
 

grandrolf

Global moderator
Team Member
Global Moderator
Trusted User
Aug 29, 2014
2,658
246
133
sweden
everyone says this, yet it doesn't work. is there another way to fix this?

No - because that is the "fix".

Minecraft pre 1.17 needs to be run on java 8, especially modded minecraft.

If you say that it doesn't work, can you provide some more information about your system - a screenshot that shows the output from "java -version"

and logs (use https://paste.feed-the-beast.com to share logs and give the link here)