Install PlantUML and Java on Mac
โ PART 1: Install Java
๐น Step 1: Check Java
java -version
๐น Step 2: Install Java
Option A (Homebrew):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install openjdk
sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
echo 'export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"' >> ~/.zprofile
source ~/.zprofile
Option B (Oracle Installer):
Download from Oracle Java Downloads
๐น Step 3: Verify
java -version
โ PART 2: Install PlantUML
๐น Step 1: Install Graphviz
brew install graphviz
๐น Step 2: Install PlantUML
Option A: Download plantuml.jar from plantuml.com/download
Option B: Homebrew install:
brew install plantuml
โ PART 3: Run PlantUML
๐น Option A: Using JAR
java -jar ~/tools/plantuml/plantuml.jar test.puml
๐น Option B: Using Homebrew version
plantuml test.puml
๐น Option C: IDE Integration
Use PlantUML plugin for VS Code or IntelliJ, set path to plantuml.jar if needed.
โ PART 4: Optional Alias
echo 'alias puml="java -jar ~/tools/plantuml/plantuml.jar"' >> ~/.zprofile
source ~/.zprofile
๐ง Troubleshooting
| Problem | Fix |
|---|---|
| java: command not found | Install Java, check PATH |
| Error: Could not find or load main class | Check JAR file path |
| Diagrams not rendering | Ensure Graphviz is installed (dot -V) |
๐ฏ Summary
| Task | Command / Action |
|---|---|
| Install Homebrew | See Part 1 Step 2 |
| Install Java | brew install openjdk |
| Install Graphviz | brew install graphviz |
| Install PlantUML | brew install plantuml |
| Download JAR | plantuml.com/download |
| Run UML (JAR) | java -jar path/to/plantuml.jar file.puml |
| Run UML (brew) | plantuml file.puml |
@startuml
skinparam style strictuml
title Snowflake Cloud Data Platform
rectangle "Cloud Services Layer\n(Query Parsing, Optimizer, Metadata,\nSecurity, Access Control)" as CloudServices
rectangle "Compute Layer\n(Virtual Warehouses,\nParallel Query Execution)" as Compute
rectangle "Storage Layer\n(Columnar Data, Micro-partitions,\nStructured & Semi-Structured)" as Storage
CloudServices --> Compute : Coordinates
Compute --> Storage : Reads/Writes
CloudServices --> Storage : Metadata Access
@enduml