Installing and Using the PlantUML Plugin in IntelliJ IDEA for UML Diagramming
This guide explains how to install the PlantUML plugin and Graphviz, configure environment variables and IntelliJ IDEA, and use PlantUML to quickly create UML diagrams and flowcharts directly within the IDE, including a sample code snippet and alternative browser options.
Many developers ask how to draw UML diagrams efficiently; this article introduces the PlantUML plugin for IntelliJ IDEA as a fast solution.
What is PlantUML
PlantUML is an open‑source tool that defines a textual language for describing UML relationships and generates diagrams using the Graphviz rendering engine, exporting them as PNG or SVG.
Advantages of PlantUML
Fully text‑based editing, no drag‑and‑drop, automatic layout.
Platform‑independent; works wherever the PlantUML JAR is available.
Integrates with many editors and IDEs such as IDEA, Eclipse, Notepad++.
As a Java developer, the focus here is on using the plugin within IntelliJ IDEA.
Installing the PlantUML Plugin in IDEA
Navigate to File → Settings → Plugins , search for "PlantUML", locate "PlantUML integration" and install it.
Installing Graphviz on Windows
Download the installer from https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi .
After installation, add the following environment variables:
Variable name GRAPHVIZ_HOME with value the installation path (e.g., D:\WorkWare\Graphviz2.38 ), then append %GRAPHVIZ_HOME%\bin to the Path variable and set GRAPHVIZ_DOT to %GRAPHVIZ_HOME%\bin\dot.exe .
Verify the configuration by opening a Windows command line and running dot -version ; the version information indicates a successful setup.
Configuring PlantUML in IDEA
Go to File → Settings → Other Settings → PlantUML and ensure the Graphviz path is correctly recognized.
Creating a Flowchart with PlantUML
Create a new .uml file, write the textual description, and the right pane will render the diagram in real time. Example:
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@endumlThe editor displays the corresponding flowchart instantly.
Other Options
If you prefer not to install Graphviz, you can use the Chrome extension "PlantUML Viewer" to edit PlantUML text and view diagrams directly in the browser.
Top Architect
Top Architect focuses on sharing practical architecture knowledge, covering enterprise, system, website, large‑scale distributed, and high‑availability architectures, plus architecture adjustments using internet technologies. We welcome idea‑driven, sharing‑oriented architects to exchange and learn together.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.