Jump to content

Recommended Posts

Posted

Hi, I'm trying to run my server and every time I use my start file I get this problem:

 

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:62)

at net.minecraftforge.fml.relauncher.ServerLaunchWrapper.main(ServerLaunchWrapper.java:31)

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

logout

My start file has this code currently (though I've used a heap of other code, theres a reason I use this):

#!/bin/bash
cd "$(dirname "$0")"
exec java -Xms1024M -Xmx4096M -jar /*(fileroute expunged for privacy)*/forge-1.10.2-12.18.3.2511-universal.jar nogui

 

If I manually open the forge jar it runs fine, but it doesn't have enough Ram.

I used to run the same files on another computer and everything worked fine as well.

Similarly, I've spent an hour going around this new computer messing with it and it is definitely using Java 8, which is what most people say about this problem.

 

Can someone please tell me how stupid I am? I would really appreciate it.

 

Posted

You must use Java 8

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

 

Posted

Run java -version

The only possible cause of this error is the use of Java 9+

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

 

Posted

I did do this and it came up with Java 8.

I guess I should give up if you guys got no idea either.

 

If you have any other advice I'd be extremely thankful, but I would like to make it clear I've gone to extreme attempts already to make sure I'm using Java 8 and still getting this issue.

Posted (edited)

Can you tell us what java versions you have installed? On Mac they are stored in /Library/Java/Java Virtual Machines/

 

and what is your JAVA_HOME variable set to?

Edited by Cadiboo

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

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.