Jump to content

(MAC OS) Forge server not starting whilst allocating more RAM to the server file


Recommended Posts

Posted

I have just recently created and used a 1.12.2 forge server (downloaded from the forgeinstaller.jar) running the well known modpack, RLCraft. The server runs perfectly fine once started up, but laggy game performance is persistent once in the server. As an attempt to correct this, I tried following guides online (Guides were Mac related) on how to allocate more RAM to a Forge Minecraft server but it never seemed to work and nothing ever started up. The forge version I am using is of the latest (forge-1.12.2-14.23.5.2847-installer) and so is my Java as well (Java 8 u231).

 

What I have done here is typed the letters "c" and "d" "SPACE" and dropped the server folder (with all the server files) into Terminal and pressed "Enter/Return". Afterwards I copied and pasted the following: "java -Xmx4096M -Xms4096M -jar forge_server.jar" (The point of me doing this was to allocate 4GB of RAM to the forge server ("forge_server.jar" is the name of my forge server file)). I then pressed "Enter/Return" and got these error logs:

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

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

It would be very much appreciated if this issue were to be resolved. Thank you.

Posted

Why did you rename the server file?

This error means you're trying to run a 1.12.2 server with Java 9 or later, you need to 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 (edited)

@DaemonUmbra

  On 12/21/2019 at 2:08 AM, DaemonUmbra said:

Why did you rename the server file?

 This error means you're trying to run a 1.12.2 server with Java 9 or later, you need to use Java 8

Expand  

Like I said before,  the version of Java I am using is Java 8 u231. I've tried uninstalling Java and reinstalling Java 8 once more but the problem still persists with the same error logs.

Edited by RedMushrooms
Posted

The error indicates that though that may be the version you want to use, it's not the one your computer is choosing.

If you don't need other versions of Java then uninstall all other versions, if you do need other versions of Java then check your PATH environment variable

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.