help with minecraft .bat file

Associate
Joined
2 Apr 2011
Posts
130
Location
Bristol
Hi, I was having problems with minecraft running out of memory but have solved this using a .bat file to specify the amount of usable memory, however, now the command window stays on the desktop when minecraft is open and doesn't close on its own when i close minecraft.

Basically I want it to be hidden when minecraft is running and close automatically when i close minecraft.

Below is the batch file I'm currently using, any help is appreciated.
@ECHO OFF
SET BINDIR=%~dp0
CD /D "%BINDIR%"
"%ProgramFiles%\Java\jre6\bin\java.exe" -Xincgc -Xmx2048M -Xms2048M -jar minecraft.jar
PAUSE
 
I have it closing on end now, just had to replace pause with cls.

the cmd also minimises when run but i'd rather have it hidden completely (as in not in the taskbar) any suggestions?
 
Put "start" in front of the path the executable and remove PAUSE from the end, i.e:

Code:
@ECHO OFF
SET BINDIR=%~dp0
CD /D "%BINDIR%"
start "%ProgramFiles%\Java\jre6\bin\java.exe" -Xincgc -Xmx2048M -Xms2048M -jar minecraft.jar
 
Back
Top Bottom