Jump to content

Forge server .bat file not lauching server with -Xmx and -Xms variables


BlackHawk

Recommended Posts

So this is weird for me,

I have a forge minecraft server (1.16.5, version 36.2.39) that I was running on few years old windows 10, and it was working perfectly fine. A week ago, I decided to completly clean my PC (hard reset of everything) and reinstall windows 10. I got my server back from pendrive only to discover, that it wasn't launching. After checking logs I saw that windows used wrong version of java: 

latest.log

[11sty2023 17:47:09.097] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmlserver, --fml.forgeVersion, 36.2.39, --fml.mcpVersion, 20210115.111550, --fml.mcVersion, 1.16.5, --fml.forgeGroup, net.minecraftforge]
[11sty2023 17:47:09.100] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 8.1.3+8.1.3+main-8.1.x.c94d18ec starting: java version 19.0.1 by Oracle Corporation

Naturally, I downloaded Java 8 and created a .bat file for launching it:

run.bat

"C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe" -Xmx4096M -Xms4096M -jar server.jar nogui
PAUSE

Now, here is the weird part. The .bat file (path is 100% correct) doesn't launch the server and  doesn't create neither log file nor debug file. However, when I remove "-Xmx4096M" and "-Xms4096M", it launched but at a very, VERY slow speed (1GB was assembled at max). I need more RAM assembled for the server to load properly.

Link to comment
Share on other sites

1.16.x is not a supported version of forge in this forum.

But your question isn't really related the version of forge you are  using.

Quote

C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe"

If java installed itself in the "Program Files (x86)" that means you downloaded the 32bit version of java which doesn't support 4GB of memory (unless it also supports certain tricks).

Download the 64bit version of java.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Link to comment
Share on other sites

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.