Start a java program without the console

I am trying to use this GUI mod for a Minecraft Server. I wrote a batch file so the server can start with more RAM. When I run just the .jar file, no command window opens and it runs just fine (of course with about 256mb ram) I was reading online that javaw starts a jar file without a command-line-console. But when I use javaw, the command console opens, but when I close it the program remains open. this is my batch file:

@echo off 
"%ProgramFiles(x86)%\Java\jre6\bin\javaw.exe" -jar -Xms1024m -Xmx1024m crafty.jar 
@echo on

I don't understand java as well as most, so please try to be as clear as possible. Thanks


If you want to start a java program without console popup under windows, this should be helpful: In command prompt type the following:

start javaw -jar -Xms1024m -Xmx1024m crafty.jar

If you want you can also write this as a batch file.


  • You should Create Shortcut of "%ProgramFiles(x86)%\Java\jre6\bin\javaw.exe", let's name it as Minecraft, then
  • edit the Properties of Minecraft shortcut. In the Target textbox, append -jar -Xms1024m -Xmx1024m crafty.jar in the end of javaw.exe
  • change the Start in as the folder which contains the crafty.jar

Double-click the Minecraft icon to star the server.

That's all.


Create a .bat file with

start javaw -jar yourjar.jar arg0 arg1

start javaw -jar yourjar.jar arg0 arg1

will open the console, but close immediately. it is different from running window .exe.