Create a new document in the folder that you have your server jar in. On the first line of this document put "#!/bin/bash". On the second line put the comand you want the script to run (for example: "java -Xms1024M -Xmx2048 -jar server.jar"). Run "chmod +x NAME_OF_NEW_DOCUMENT" to make the new script executable. Run "sh NAME_OF_NEW_DOCUMENT" while in the directory the script is in to start the server.
Create a new document using notepad in the folder the server jar is in. Type the command you want to run (for example "java -Xms1024 -Xmx2048 -jar server.jar") into the first line of the new document. Save the document as run.bat. To run the server double click on run.bat.