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.