Right-click the project in Eclipse and select Export . Select Java-> Runnable JAR File .
Then you can select the specific Eclipse launch configuration on which the export will be based (i.e. the main class and the class path used to run it), extract or package the necessary libraries, and create an ANT script (so you can create a JAR file outside Eclipse).
source
share