There are hundreds of Java libraries available today that cover every type of programming problem a Java developer is likely to come across. This article will take a look at Java libraries (core java and third party) every Java developer should know about before they write their first piece of code. Unfortunately, you will not find any of below mentioned third party libraries in java books since they are mostly project and requirements specific.
Most Widely Used Third Party Libraries
Below are some of the best and heavily used third party open source libraries in java. These libraries demonstrate the real power of java and make Java one of the most popular language on planet.
Popular Utility Libraries
Apache Commons Collections
This is a library that provides enhancements on core java collections. It provides additional collections and utility methods to manipulate collection objects easily and efficiently.
Do you Know : Bad features of Java
Google Guava
Google Guava is an open-source set of common libraries for Java. It is designed by Google and was previously known as Google Collections. It’s a useful source of miscellaneous utility functions and classes. It’s basically a core library for immutable collections, string manipulation, caching, primitives support, and easier I/O functions.
Apache DBCP - Database Connection Pooling Library
This is a powerful library that provides feature of connection pooling to relational databases. This library has existed for long time and has been used in many applications including application servers.
Apache IO - Input Output Utilities
Apache IO is a powerful library to do file and stream operations efficiently and quickly in java.
Many utility methods from this library have been adopted in recent Java versions.
You should read : Real use of Reflection in Java
XML Manipulation Libraries
Apache Commons Digester For XML
Digester is a XML to Java mapping utility that has been heavily used in XML communication using java. Reading XML config files and data can be really easy the digester.
JSoup
jSoup is a library that is used for parsing HTML file in Java. It can be used for web application unit testing and web scraping. Its “jQuery-like” and “regex” selector syntax is very easy to use for data extraction. jSoup is quite fast in retrieving the raw page content.
XML Parsers
JDOM
JDOM is a popular DOM parser library that is widely used in many java applications for parsing XML.
DOM4J
Its a simple open source library for manipulation of XML, XSLT and XPath.
XERCES
Yet another popular XML parser.
JSON Libraries
Gson
JSON parsing library by Google
Jackson
A high performance JSON processor. Jackson is a multi-purpose Java library for processing JSON and XML data format. It’s a fast, lightweight and user-friendly library for developers.
XStream
XStream is a simple library to serialize objects to XML and JSON
For Security : Scan Uploaded File using VirusTotal Java Library
Popular Chart And Graph Libraries In Java
There are many good charting libraries in java we have picked two of the most popular ones in this list.
JFreeChart
The JFreeChart is the easiest and most widely used graphical library for creating a wide variety of good looking charts. JFreeChart allows the users to generate pie chart, bar chart, timeseries chart, Gantt chart, histogram, X-Y charts and various specific charts.
JasperReports
This is a full fledged feature rich library to create graph and charts. This is also available with enterprise support.
Advance level : Search Text In PDF Using Java
Popular JDBC & Object Relational Mapping Frameworks in Java
ORM tools have been criticized for its weaknesses http://java.dzone.com/articles/martin-fowler-orm-hate however they are still very popular since they can help developers avoid writing queries for most part of the project.
Hibernate
Hibernate ORM (object-relational mapping) is a Java library released this year in April that provides a framework to perform object relational mapping and query databases using HQL (Hibernate Query Language) and SQL. Hibernate supports mapping of Java classes to database tables. Hibernate is data independent, i.e. same code will work on all databases.
MyBatis
MyBatis (formerly iBatis) is another popular ORM tool after hibernate. This is still under active development and being used by many people.
JGraphT
jGraphT is another free Java library that provides mathematical graph theory objects and algorithms basically with focus on data structures. It supports various types of graphs like directed and undirected, multigraphs, pseudographs, unmodifiable graphs and many more. It is a simple to use and efficient Java library.
FreeHEP
FreeHEP, an open source Java library enables users to easily write Java code for applications that involve higher energy physics. Although the main focus of this library is high-energy physics, it does contain many APIs that are generic and suitable for non-physics applications.
The Lightweight Java Game Library (LWJGL)
This Java game library is platform independent and offers access to OpenGL, OpenCL and OpenAL. Apart from handling graphics and gaming sounds, it provides access to controllers such as Gamepads, Steering wheels and Joysticks. If you are a Java developer, developing a game, give LJGL a try.
Java WordNet Library (JWNL)
JWNL is an API that allows Java applications to retrieve data from WordNet. JWNL allows developers to easily build NLP applications.
Java Text Categorizing Library (JTCL)
It is Java implementation of libTextCat; a library for language guessing.
OpenNLP
Open NLP is a library from Apache used for processing natural language text. It is a collection of Java-based NLP tools for part-of-speech tagging, sentence-segmentation, tokenization, chunking, parsing and entity extraction. It supports Maximum Entropy Model (MaxEnt); a popular machine learning model for natural language processing task.
Commons Math
Commons Math is another great library from Apache. It addresses the most common problems of mathematics and statistics that is not available in Java programming language.
For Swing : Use Notification Tray in Java Application
Logging Libraries
Log4j
The most popular and oldest logging library.
Logback
Logback is a logging framework that has some really useful features that are not supported by log4j.
SLF4J
Every Java programmer knows that logging is critical for any Java application, especially server side application. Most of the programmers would be familiar with SLF4J as it is the most popular logging library. It provides Java API for various logging frameworks allowing users to plug in the desired logging framework at deployment time.
Document Manipulation
Apache POI
Apache POI is a powerful java API for microsoft documents.
Docx4j
Docx4j is yet another document manipulation library for multiple types of document processing.
Application Layer Frameworks
Spring
Spring is the most popular dependency injection framework.
Struts
Struts is one of the most widely used web framework on Java.
GWT Google Web Toolkit
GWT is a web user interface library that can render Javascript and HTML based UI using Java code.
Vaadin
Vaadin is a Java framework for web beautiful looking applications.
Grails
Grail is open source framework based on Groovy that support rapid application development.
Play Framework
Play framework is another powerful web application framework for Java and Scala developers.
Netty
Netty is asynchronous event-driven network application framework for developing high performance applications.
Akka
Akka is powerful application framework for developing high performance java tools.
These are the Java libraries all Java developers should make use of whenever required!
SWT
SWT is a open source widget toolkit developed by eclipse foundation. This is a really powerful library developed by IBM.
Apache Pivot
Pivot is a open source platform for developing installable desktop UI applications in Java.