days
-6
-8
hours
0
-4
minutes
-5
-7
seconds
-4
-2
search
Sharing is caring

The top 100 Java libraries in 2016 — After analyzing 47,251 dependencies

Henn Idan
libraries

Young man in library image via Shutterstock

Who’s on top and who’s left behind? Takipi analyzed 47,251 dependencies on Github and pulled out the top 100 Java libraries.

This post was originally published on the Takipi blog – Java and Scala exception analysis and performance monitoring.

Our favorite pastime for long weekends is to go through Github and search for popular Java libraries. We decided to share the fun and the information with you.

We analyzed 47,251 import statements of 12,059 unique Java libraries that are used by the top 3,862 Java projects on Github. From that list we extracted the top 100, and now we’re sharing the results. Cue the drum roll.

The top 20 most popular Java libraries

Top20

Source: http://blog.takipi.com/the-top-100-java-libraries-in-2016-after-analyzing-47251-dependencies/

Holding the crown from last year, junit is the most popular Java library on Github. While the Java logging API slf4j reached second place, log4j reached the fourth place.

A rising trend in the list is Google’s open-source Guava, that reached third place. It contains a range of core Java libraries that were born internally at Google. If you’re not familiar with Guava or if you’re not sure how to use it, you can read our post about some of the lesser known features of Google Guava that every developer should know.

The rise of Spring libraries

The Spring framework became popular in the Java community as a main competitor to Java EE, and this popularity is also reflected in Github; out of the 100 most popular libraries, 15 are Spring related. The most interesting part here is the meteoric rise of Spring Boot, that allows developers to create Spring-powered applications and services with minimum boilerplate. Do you want to get a production ready Java application off the ground in the shortest time possible? Check out our post about Java Bootstrap: Dropwizard vs. Spring Boot.

Top Spring libraries

#13 – springframework.spring-context
#17 – springframework.spring-test
#22 – springframework.spring-webmvc
#24 – springframework.spring-core
#27 – springframework.spring-web
#36 – springframework.spring-jdbc
#37 – springframework.spring-orm
#38 – springframework.spring-tx
#40 – springframework.spring-aop
#47 – springframework.spring-context-support
#72 – springframework.boot.spring-boot-starter-web
#81 – springframework.security.spring-security-web
#82 – springframework.security.spring-security-config
#88 – springframework.boot.spring-boot-starter-test
#99 – springframework.security.spring-security-core

SEE ALSO: The Top 100 libraries on GitHub

The most popular JSON libraries

Since Java doesn’t have native support for JSON (although it almost made it into Java 9!), we wanted to see how popular these libraries are among Github projects.

You shouldn’t judge a library by its cover. Not all JSON libraries perform the same, and picking the right one for your environment can be critical. If you want to know which one you should use, check out our latest JSON benchmark.

The top JSON libraries are…

#14 – fasterxml.jackson.core.jackson-databind
#19 – google.code.gson.gson
#43 – json.json
#80 – googlecode.json-simple.json-simple
#89 – thoughtworks.xstream.xstream

The fantastic 4 (that’s worth mentioning)

There are plenty of interesting and even new libraries that caught our attention, but we decided to focus on these 4:

#68 – projectlombok.lombok – This project aims to reduce boilerplate in Java, replacing some of the worst offenders with a simple set of annotations.

#90 – jsoup.jsoup – A Java library for working with real-world HTML. It provides an API for extracting and manipulating data using DOM manipulation, CSS and jquery-like methods.

#92 – io.netty.netty-all – A network application framework for quick and easy development of maintainable high performance protocol servers & clients.

#98 – dom4j.dom4j – Open source framework for processing XML. It’s integrated with XPath and offers full support for DOM, JAXP and Java platform.

Top 100 libraries by type

topType

Source: http://blog.takipi.com/the-top-100-java-libraries-in-2016-after-analyzing-47251-dependencies/

The math behind the magic (or: How did we come up with our list)

You’re probably asking yourself how did we get this information. We first pulled out the top Java projects from Github by their ratings. We took that data and extracted the projects who use Maven or Ivy for dependency management to gain quick access to their pom.xml / ivy.xml dependencies, this left us with 47,251 data points.

We did some mad crunching and analyzing, which left us with 12,059 unique Java libraries that are used by the top 3,862 Java projects on Github. From there it was easy to get the top 100 libraries, based on the number of Github projects they appear in.

If you want to look into our raw data, the file is available here. Although we were sober this time around, you’re still welcome to take a look and make sure we didn’t miss any interesting insight.

Final thoughts

When we compare our current Top 100 list vs last year’s results, we can detect some movements among smaller libraries, with an rising interest in Spring and the depart of MongoDB.

However, when looking at the majority of Java developers they’re pretty consistent when it comes to their choice of Github libraries. It’s not a big surprise, considering the amount of existing projects using these libraries that will keep on using them through 2017 and beyond.

If you already have your choice of libraries but you’re still looking for the ultimate tools, we have the perfect advice for you. Check out The Top 15 Tools Java Developers Use After Major Releases.

Java/Scala Developer? Takipi replaces logging in production JVMs and lets you see the variable state that caused each log error and exception – Try Takipi.

Author
Henn Idan
I write about Java, Scala and everything in between. Lover of gadgets, apps, technology and tea.