'Java why is my jar file so big?
Solution 1:[1]
It seems that you're using a lot of external libraries (now when you provided the code seems that they pulled by Selenium) in your code and intellij kindly packs them together into one jar, so you can run your program without need to care about class path in runtime.
To reduce the size of your jar I can suggest the following approaches:
Reduce amount of external libraries (imported classes). For example don't include java.io.* but only the class you're actually using.
Build proper compilation script using ant or maven. Then your jar will include only your classes and will be very small relatively to what you have now. However to run your code you'll need to care about having all required libs in runtime.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |

