6

What are the differences between JAR, Fat JAR and Executable JAR? How are they created from command line and gradle.build task(in case of gradle project)?

Are there any other JARs apart from above mentioned?

2240
  • 1,547
  • 2
  • 12
  • 30
origin
  • 120
  • 2
  • 8
  • duplicate of two questions https://stackoverflow.com/questions/19150811/what-is-a-fat-jar and https://stackoverflow.com/questions/5258159/how-to-make-an-executable-jar-file – Sharon Ben Asher Feb 10 '19 at 11:54
  • Possible duplicate of [What is a fat JAR?](https://stackoverflow.com/questions/19150811/what-is-a-fat-jar) – Sharon Ben Asher Feb 10 '19 at 11:54
  • Possible duplicate of [How to make an executable jar file?](https://stackoverflow.com/questions/5258159/how-to-make-an-executable-jar-file) – Turing85 Feb 10 '19 at 11:56

1 Answers1

7

They're just ways of packaging the java apps.

Skinny – Contains ONLY the bits you literally type into your code editor, and NOTHING else.

Thin – Contains all of the above PLUS the app’s direct dependencies of your app (db drivers, utility libraries, etc).

Hollow – The inverse of Thin – Contains only the bits needed to run your app but does NOT contain the app itself. Basically a pre-packaged “app server” to which you can later deploy your app, in the same style as traditional Java EE app servers, but with important differences.

Fat/Uber – Contains the bit you literally write yourself PLUS the direct dependencies of your app PLUS the bits needed to run your app “on its own”.

Source: Article from Dzone

Mark Han
  • 2,785
  • 2
  • 16
  • 31