Accepted answer
  1. extract required libraries into jar - extracts the actual .class files from the libraries your app uses and puts those .class files inside the runnable jar. so, the runnable jar will not only contain the .class files of your application, but also the .class files of all the libraries your application uses.

  2. package required libraries into jar - puts the actual jar files of the libraries into your runnable jar. normally, a jar file within a jar file cannot be loaded by the jvm. but eclipse adds special classes to the runnable jar to make this possible.

  3. copy required libraries into sub folder next to jar - keeps the library jars completely separate from the runnable jar, so the runnable jar will only contain the .class files of your application.

option #2 is convenient because it packages everything neatly into a single jar, and keeps the library jars separated from your application's .class files.

however, a downside to packaging everything inside of a single jar (options #1 and #2) is that, if you update your application, then the user will have to download more data to update the application. if the jars are kept separate, then the user would only have to download the jar that contains your application code, instead of a single, massive jar that contains your application code and all the library code.

Related Query

More Query from same tag