Create a Java project in Eclipse
When created, import Processings core.jar: http://processing.org/learning/eclipse/
In you Java Project, create the attached files.
To export as a .jar file, right-click your project. Choose "Java > runnable Jar". Remember to choose you MainClass as the main class in the dialog.
give you .jar file a name. Press export.
Now run your .jar file on the command line using: java -jar MyJarName.jar