Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between JAR, Fat JAR, Executable JAR

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?

like image 506
origin Avatar asked Feb 10 '19 11:02

origin


1 Answers

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

like image 78
Yumed Pablo Camacho Avatar answered Sep 29 '22 19:09

Yumed Pablo Camacho