if you are running a 32 bit operating system, java will not launch the server if you try to give it more than 1.5 gigs of ram (i think it was 1.5, it may be just 1, idr atm)
add PAUSE in the next line of the .bat file to keep the console window open.
Code:
java -Xmx512M -Xms1024M -jar minecraft_server.jar -nogui
pause
edit: wait i see a goof in that... so much for copy paste
Code:
java -Xmx1024M -Xms512M -jar minecraft_server.jar -nogui
pause
person i copied from had those reversed... bad Nessiroj!