I've been trying to run a Minecraft server from my own PC.
Everything went smoothly, I changed the EULA to true, I started the server by double-clicking it, I even logged on to the server, until I tried specifying the amount of ram I wanted to allocate to the server. This needs to be done by command prompt, so I copied the command from the official server download page. I specified I wanted to give it 4GB of ram.
The command I used: java -Xms4096M -Xmx4096M -jar server.jar
It gave me an error: "Error: Unable to access jarfile server.jar"
This happened for any amount of ram I entered.
After some googling, I decided to specify the path cmd needed to take.
I used this command: path=c:\Users\Pieter\Documents\MinecraftServer>java -jar -Xms4096M -Xmx4096M server.jar
This did not give me an error, however after running this command nothing happened.
That's where I ran into a roadblock, I've searched the internet for hours and have yet to find a fix.
I also want to add that the command "path=c:\Users\Pieter\Documents\MinecraftServer>java -jar server.jar" does noting as well. It doesn't run server.jar, nor give me an error.
Hello there,
I've been trying to run a Minecraft server from my own PC.
Everything went smoothly, I changed the EULA to true, I started the server by double-clicking it, I even logged on to the server, until I tried specifying the amount of ram I wanted to allocate to the server. This needs to be done by command prompt, so I copied the command from the official server download page. I specified I wanted to give it 4GB of ram.
The command I used: java -Xms4096M -Xmx4096M -jar server.jar
It gave me an error: "Error: Unable to access jarfile server.jar"
This happened for any amount of ram I entered.
After some googling, I decided to specify the path cmd needed to take.
I used this command: path=c:\Users\Pieter\Documents\MinecraftServer>java -jar -Xms4096M -Xmx4096M server.jar
This did not give me an error, however after running this command nothing happened.
That's where I ran into a roadblock, I've searched the internet for hours and have yet to find a fix.
I also want to add that the command "path=c:\Users\Pieter\Documents\MinecraftServer>java -jar server.jar" does noting as well. It doesn't run server.jar, nor give me an error.
Thank you in advance for answering,
Regards,
PyroBlaze202
So you created a batchfile with the command to run the server.jar
- the server.jar is the correct name of the file you want to run?
- the batch file is inside the MinecrftServer Folder?
- is the server active in the background? check Task manager
Thanks for the reply!
I was already running the pause part to check for errors, sadly enough it didn't give me any though.
Without specifying the path (when I run your command) it gives me this error: "Error: Unable to access jarfile server.jar"
When I do specify I get no error, but the server doesn't start up either.
I thought I'd add that my cmd gives me this when running my original command
(path=c:\Users\Pieter\Documents\MinecraftServer>java -jar -Xms4096M -Xmx4096M server.jar
pause):
C:\Users\Pieter\Documents>path=c:\Users\Pieter\Documents\MinecraftServer -jar -Xms4096M -Xmx4096M server.jar 1>java
C:\Users\Pieter\Documents>pause
Press any key to continue . . .
Regards,
PyroBlaze202
do you use the cmd console to start the server or are you running the server via a .bat ?
Both gave me the same result.
I tried it on my system and it seems that the vanilla server version of 1.15 is not able to create a java VM with more than 1 Gb of Ram
Maybe try a bukkit version of the Minecraft Server
So I should adjust my ram settings to a maximum of 1024MB of ram?
That doesn't seem to be it, the same as before happens, nothing. :/
then your path to the server.jar or the server.jar name is wrong
try it with a batch/bat file inside your server folder
my server startup batch file
@echo off
java -Xmx1024M -Xms1024M -jar server.jar nogui
pause
That did it!
Thank you for the help!