Jump to content

Recommended Posts

Posted (edited)

When I run this command

sudo java -Xmx2G -jar forge-1.12.2-14.23.5.2838-universal.jar nogui

This is what gets output in my console.

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

 

I'm doing this with a freshly installed forge server. I used the installer, not the universal. I've already tried uninstalling every version of Java I had installed and I've tried specifically with Java 8 and got the same issue.

 

The issue came up kind of out of nowhere. I was updating the mod files and everything since the modpack we were running on the server updated, and after replacing the mods, scripts, config, etc. folders in my server directory I suddenly started getting errors when I tried to launch the server again.

 

Edit: Just thought it might be worth mentioning that when I try to launch a vanilla minecraft server out of the same directory and on the same game version, it works completely fine.

 

Edit Again: Attached the console logs that show me installing the forge server then trying to run it and it not fucking working

logs.txtFetching info...

Edited by Aox2120
Posted

This error indicates you are running the server with Java 9 or later.

Even if you had Java 8 installed and got this error it means that Java 8 installation is not the installation your PC is attempting to use.

 

The fix for this is either remove all other Java installations, or

Fully qualify the java invocation by specifying the full path to the java exe

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.