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