However, I'd prefer if you used another variable than "path", which is also a system variable. Setting it this way of course sets it only locally for the execution of the .bat but it still shouldn't be done that way.
Ah, also, the script should wait before restarting, otherwise you get no time to close the server for good when using the stop command. If you're on Vista+ you have access to the timeout /t command - previously you had to do some nonsensical ping >nul magic to get sleeps/waits/timeouts.
Modified version of your script:
@echo off title Minecraft Server set server="P:\ath\to\minecraft_server.jar" :minecraft echo (%time%) Minecraft SMP started. start /B /wait java -jar -Xmx1024M -Xms1024M %server% nogui echo (%time%) WARNING: Minecraft SMP closed or crashed, restarting. timeout /t 10 /nobreak goto minecraft