Can't access server when with more than 2 GB of RAM available

I made a server using forge, and me and my friends can play in the server without problems (i'm using Evolve, not Hamachi), but when I use a batch file to start the server and change -Xmx1024M to -Xmx2048M, the server runs without problems and I can access it, but my friends can't. I tried setting manually the ip for the server but it didnt work.

I'm using this batch script:

"C:\Program Files\Java\jre7\bin\java.exe" -Xmx2048M -Xms512M -jar server.jar nogui PAUSE

Thanks in advance!


Solution 1:

"C:\Program Files\Java\jre7\bin\java.exe" -Xmx2048M -Xms512M -jar server.jar nogui PAUSE"

I believe both the Xmx and the Xms must be the same.

"C:\Program Files\Java\jre7\bin\java.exe" -Xmx2048M -Xms2048M -jar server.jar nogui PAUSE"