Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hello,
I'm trying to use the forge installer to install a modded server on my computer. I've tried about 5 separate times now (each time in a different folder) to install the server yet it crashes each time I try to run it. The unmodded vanilla server .jar file downloaded through the installer runs just fine, however trying to run the forge server .jar (with or without my batch file) produces the following error:

Spoiler

C:\Users\DIRECTORYSTUCTURE\>java -Xmx1024M -Xms1024M -jar forge-1.12.2-14.23.1.2555-universal.jar
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(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        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: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
        at net.minecraft.launchwrapper.Launch.<init>(Launch.java:34)
        at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
        ... 6 more

C:\Users\DIRECTORYSTRUCTURE\>pause
Press any key to continue . . .

The contents of the batch file I'm trying to use are as follows:

Spoiler

java -Xmx1024M -Xms1024M -jar forge-1.12.2-14.23.1.2555-universal.jar
pause

Any idea what's up? Thanks.

 

EDIT: Forge installer version is 1.12.2-14.23.1.2555

Edited by impromptutriplet

1 hour ago, impromptutriplet said:

Caused by: java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader

 

You're using Java 9, which isn't supported by Forge. You need to use Java 8 instead.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

  • Author
6 hours ago, Choonster said:

 

You're using Java 9, which isn't supported by Forge. You need to use Java 8 instead.

That fixed it! For anyone else having this problem you don't need to uninstall Java 9, if you have 9 and 8 installed you can specify which version of Java to run by entering the full directory in your batch file like so:

Spoiler

"C:\Program Files\Java\jre1.8.0_151\bin\java" -Xmx1024M -Xms1024M -jar forge-1.12.2-14.23.1.2555-universal.jar
pause

Note the quotes around the directory, they're necessary if there are any spaces (like in the folder "Program Files").

 

Thanks for the help!

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.