how to export project to jar file with libraries eclipse code example
Example: java to jar
# cd into the directory that contains your project
jar cvfe <output jar filename>.jar <main class location> *
# cd into the directory that contains your project
jar cvfe <output jar filename>.jar <main class location> *