In Eclipse you can do it simply as follows :
Right click on your Java Project and select Export.
Select Java -> Runnable JAR file -> Next.
Select the Launch Configuration and choose project file as your Main class
Select the Destination folder where you would like to save it and click Finish.