Fundamentals 4 min read

How to Install and Use PlantUML Plugin in IntelliJ IDEA for UML Diagram Creation

This guide explains how Java developers can install Graphviz and the PlantUML plugin in IntelliJ IDEA, configure environment variables, and create UML sequence and class diagrams directly within the IDE, including code examples and troubleshooting tips.

Selected Java Interview Questions
Selected Java Interview Questions
Selected Java Interview Questions
How to Install and Use PlantUML Plugin in IntelliJ IDEA for UML Diagram Creation

Many developers wonder how to quickly draw flowcharts or UML class diagrams; this article recommends the PlantUML plugin for IntelliJ IDEA as a fast solution.

What is PlantUML? PlantUML is an open‑source project that defines a textual language for describing UML relationships and uses the powerful Graphviz rendering engine to generate diagrams, which can be exported as PNG or SVG.

Advantages of PlantUML

Fully text‑based editing, no drag‑and‑drop controls, automatic layout, clean appearance.

Platform‑independent; only the PlantUML JAR is required.

Integrates with many editors and IDEs such as IDEA, Eclipse, Notepad++.

For Java developers who primarily use IntelliJ IDEA, the following steps show how to set it up.

Install the PlantUML plugin in IDEA Navigate to File → Settings → Plugins , search for "PlantUML", locate the "PlantUML integration" entry and install it.

Install Graphviz on the computer Download the Windows installer from https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi .

Configure environment variables Add a variable GRAPHVIZ_HOME with the installation path, e.g. D:\WorkWare\Graphviz2.38 . Append %GRAPHVIZ_HOME%\bin to the Path variable, and set GRAPHVIZ_DOT to %GRAPHVIZ_HOME%\bin\dot.exe . Verify the setup by running dot -version in a command prompt; a version output indicates success.

Configure PlantUML in IDEA Go to File → Settings → Other Settings → PlantUML and ensure the Graphviz path is recognized.

Using PlantUML to draw a flowchart

Create a new .uml file and write PlantUML code. Example:

@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response

Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml

The right‑hand pane will render the diagram in real time.

You can also generate UML class diagrams from existing code, or use the "IDEA 中一个被低估的功能" method to convert a project into a class diagram.

Alternative approach If you prefer not to install Graphviz, you can use the Chrome extension "PlantUML Viewer" to edit PlantUML text directly in the browser and view the rendered diagram.

JavaPlantUMLsoftware designUMLIntelliJ IDEAGraphviz
Selected Java Interview Questions
Written by

Selected Java Interview Questions

A professional Java tech channel sharing common knowledge to help developers fill gaps. Follow us!

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.