Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server.bat file wont open #2332

Closed
Nightmare0099 opened this issue Aug 22, 2024 · 1 comment
Closed

server.bat file wont open #2332

Nightmare0099 opened this issue Aug 22, 2024 · 1 comment
Labels
Env: Bad Java Version Env: Server Type: Support For questions and other inquiries that are not a bug or feature request.

Comments

@Nightmare0099
Copy link

Bug Description

the server.bat file wont open i have already downloaded the latest version on java

Did this behavior use to work in the previous version?

Steps to Reproduce (for bugs)

Logs

  • Client/Server Log:Starting Sky Factory 4 Server...
    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:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    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.(Launch.java:34)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    ... 6 more
  • Crash Log:

World Information

  • World Preset:
  • Prestige Enabled:
  • Modpack Version world created in:
  • Additional Content Installed:

Client Information

  • Modpack Version:
  • Java Version: latest
  • Launcher Used:
  • Memory Allocated:
  • Server/LAN/Single Player:
  • Optifine Installed:
  • Shaders Enabled:

Server Information

  • Java Version:
  • Operating System:
  • Hoster/Hosting Solution:
  • Sponge (Non-Vanilla Forge) Server:
@sam-kirby
Copy link
Contributor

Your version of Java is too modern; this version of Minecraft Forge requires you use Java 8, which has no concept of modules.

Either uninstall this latest version of Java and install a 64-bit build of Java 8, or should you require the latest version of Java for other purposes you can install Java 8 alongside it and then modify the start script so that it uses this version by absolute path, an example of this is as follows (which you can copy and paste assuming the installation location matches):-

@echo off

call settings.bat

:start_server
echo Starting Server
"C:\Program Files\Java\jre-1.8\bin\java.exe" -Xms%MIN_RAM% -Xmx%MAX_RAM% %JAVA_PARAMETERS% -jar %SERVER_JAR% nogui
pause
exit /B

goto start_server

@sam-kirby sam-kirby added Env: Bad Java Version Type: Support For questions and other inquiries that are not a bug or feature request. labels Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Env: Bad Java Version Env: Server Type: Support For questions and other inquiries that are not a bug or feature request.
Projects
None yet
Development

No branches or pull requests

2 participants