Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Java
  3. JGraphT

JGraphT

EPL-2.0Java

A free Java library providing mathematical graph-theory objects and algorithms.

Visit WebsiteGitHubGitHub
2.8k stars863 forks0 contributors

What is JGraphT?

JGraphT is a free, open-source Java library that provides mathematical graph-theory objects and algorithms. It allows developers to create, manipulate, and analyze various types of graphs (directed, undirected, weighted) and apply algorithms like shortest path, connectivity, and flow computations. It solves the problem of implementing complex graph structures and algorithms from scratch in Java applications.

Target Audience

Java developers and researchers working on applications involving network analysis, data relationships, optimization problems, or any domain requiring graph modeling and algorithmic processing.

Value Proposition

Developers choose JGraphT for its comprehensive feature set, strong adherence to graph theory principles, modular design, and active community support. It offers a production-ready, well-documented alternative to building custom graph solutions, with extensive algorithm coverage and format support.

Overview

Master repository for the JGraphT project

Use Cases

Best For

  • Modeling social networks or communication graphs for analysis
  • Solving routing and shortest path problems in transportation or logistics
  • Performing dependency analysis in software build systems
  • Implementing recommendation systems based on graph relationships
  • Conducting academic research requiring graph algorithms in Java
  • Visualizing complex data relationships interactively

Not Ideal For

  • Applications requiring real-time graph processing with sub-millisecond latency
  • Projects built in non-Java ecosystems like Python or JavaScript
  • Simple graph tasks solvable with basic adjacency lists or maps
  • Environments with strict memory constraints favoring lightweight libraries

Pros & Cons

Pros

Comprehensive Algorithm Suite

Includes a wide array of graph algorithms like shortest path, connectivity, and flow, as highlighted in the Key Features, saving developers from implementing complex math from scratch.

Extensive Format Support

Supports import/export in DOT, GraphML, CSV, and JSON via the jgrapht-io module, enabling seamless data exchange with other tools and systems.

Modular Architecture

Designed with separate modules (e.g., jgrapht-core, jgrapht-opt) for core functionality and optimizations, allowing flexible integration and extensibility.

Visualization Integration

Offers integration with JGraphX for interactive graph visualization and editing, as mentioned in the Key Features, aiding in debugging and presentation.

Cons

Dependency Heavy

The library relies on multiple external dependencies (e.g., JHeaps, JGraphX, Guava), which can increase project size and complexity, as seen in the release contents list.

Java Version Lock-in

Requires JDK 11 or later starting with version 1.5.0, limiting compatibility with legacy Java applications or older development environments.

Dual Licensing Complexity

Offered under both LGPL 2.1 and EPL licenses, which may require careful legal review for proprietary projects, adding overhead for commercial use.

Frequently Asked Questions

Quick Stats

Stars2,776
Forks863
Contributors0
Open Issues101
Last commit5 days ago
CreatedSince 2012

Tags

#java-library#open-source#graph-algorithms#data-structures#java#graphs#network-analysis#graph-visualization#directed-graphs#graph-theory#datastructures#maven#graph-api

Built With

j
jUnit
G
Guava
M
Maven
J
Java
A
ANTLR

Links & Resources

Website

Included in

Java47.5k
Auto-fetched 1 day ago

Related Projects

TablesawTablesaw

Java dataframe and visualization library

Stars3,758
Forks649
Last commit1 day ago
XChartXChart

XChart is a light-weight Java library for plotting data.

Stars1,591
Forks399
Last commit2 days ago
JGraphXJGraphX

JGraphX is a Java Swing diagramming library for visualizing and interacting with node-edge graphs, not charts. It enables developers to build applications like workflow editors, organizational charts, UML tools, and network visualizations with support for XML stencils, import/export, and automatic layouting. ## Key Features - **Graph Visualization** — Render and display mathematical graphs with nodes and edges in Java Swing applications. - **Interactive Editing** — Provides tools for users to create, modify, and interact with graph elements directly. - **XML Stencils Support** — Import and export graph definitions using XML-based stencil formats. - **Automatic Layouting** — Algorithms to automatically position nodes and edges for cleaner visual representations. - **Extensive Examples** — Includes sample applications from HelloWorld to a complete GraphEditor for reference. ## Philosophy JGraphX is designed as a specialized library for graph visualization rather than general charting, focusing on flexibility and interactivity for diagramming applications.

Stars692
Forks364
Last commit5 years ago
Chart-FXChart-FX

A scientific charting library focused on performance optimised real-time data visualisation at 25 Hz update rates for data sets with a few 10 thousand up to 5 million data points.

Stars611
Forks111
Last commit4 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub