your friends not being able to connect has nothing to do with the bat file. The bat file launches the server. 'Localhost' aka you can then join. If you want friends to be able to join, you'll have to open the standard port 25565 or an alternative port if you like another one. Opening those ports is different for every router so I'll need more info to help your further. Adding more ram on the server though is just launching the included bat file on Windows, or making a .command file in Mac OS X