Problem
You would like to create PlantUML diagrams on your Mac but don’t have the prerequisites or cli installed.
Solution
Steps
- Install java with
brew install java
- Install PlantUML with
brew install plantuml
Output for Java
- Your output will look like the below if it is a new installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌─[user@laptop] – [~] – [Wed Feb 14, 15:13] | |
└─[$] <> brew install java | |
==> Downloading https://formulae.brew.sh/api/formula.jws.json | |
##O=- # # | |
==> Downloading https://formulae.brew.sh/api/cask.jws.json | |
############################################################################################################################################################################################################# 100.0% | |
Warning: Cask homebrew/cask/java was renamed to homebrew/core/java. | |
==> Downloading https://ghcr.io/v2/homebrew/core/openjdk/manifests/21.0.2 | |
Already downloaded: /Users/user/Library/Caches/Homebrew/downloads/d437bb150fa297f0ee7f7f26594cb0a1e7aec55a45ec6570ed8660a033b7c3f9–openjdk-21.0.2.bottle_manifest.json | |
==> Fetching openjdk | |
==> Downloading https://ghcr.io/v2/homebrew/core/openjdk/blobs/sha256:9850be1875b9df8e9fa3510b6f2e947be2ff228d64a1c8e0daebc57a018ce2ef | |
Already downloaded: /Users/user/Library/Caches/Homebrew/downloads/ea1872f4761168acb4af2804e61d03cc5b31765cbc2ee364efcf7e10a67d2c8d–openjdk–21.0.2.arm64_sonoma.bottle.tar.gz | |
==> Pouring openjdk–21.0.2.arm64_sonoma.bottle.tar.gz | |
==> Caveats | |
For the system Java wrappers to find this JDK, symlink it with | |
sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk | |
openjdk is keg-only, which means it was not symlinked into /opt/homebrew, | |
because macOS provides similar software and installing this software in | |
parallel can cause all kinds of trouble. | |
If you need to have openjdk first in your PATH, run: | |
echo 'export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"' >> ~/.zshrc | |
For compilers to find openjdk you may need to set: | |
export CPPFLAGS="-I/opt/homebrew/opt/openjdk/include" | |
==> Summary | |
🍺 /opt/homebrew/Cellar/openjdk/21.0.2: 600 files, 331.2MB | |
==> Running `brew cleanup openjdk`… | |
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. | |
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). |
- Your output will look like the below if it is already installed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌─[user@laptop] – [~] – [Wed Feb 14, 14:55] | |
└─[$] <> brew install java | |
==> Downloading https://formulae.brew.sh/api/formula.jws.json | |
############################################################################################################################################################################################################# 100.0% | |
==> Downloading https://formulae.brew.sh/api/cask.jws.json | |
############################################################################################################################################################################################################# 100.0% | |
Warning: Cask homebrew/cask/java was renamed to homebrew/core/java. | |
Warning: openjdk 21.0.2 is already installed and up-to-date. | |
To reinstall 21.0.2, run: | |
brew reinstall openjdk |
Output for PlantUML
- Your output will look like the below if it is a new installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌─[user@laptop] – [~] – [Wed Feb 14, 15:16] | |
└─[$] <> brew install plantuml | |
==> Downloading https://ghcr.io/v2/homebrew/core/plantuml/manifests/1.2024.1 | |
Already downloaded: /Users/user/Library/Caches/Homebrew/downloads/34e1194efa92f43fc1d37f47254e076fc6defb4330b5500d36e5685aed26e3e6–plantuml-1.2024.1.bottle_manifest.json | |
==> Fetching plantuml | |
==> Downloading https://ghcr.io/v2/homebrew/core/plantuml/blobs/sha256:3f9404a546ff9e549e1b640e77515b3815819a4b36239fc9b17effe8135c65e3 | |
Already downloaded: /Users/user/Library/Caches/Homebrew/downloads/2d560846774dbc633917be48445efd06524e670aaf0b7299d210b7cff5c91afa–plantuml–1.2024.1.all.bottle.tar.gz | |
==> Pouring plantuml–1.2024.1.all.bottle.tar.gz | |
🍺 /opt/homebrew/Cellar/plantuml/1.2024.1: 4 files, 11.3MB | |
==> Running `brew cleanup plantuml`… | |
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. | |
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). |
- Your output will look like the below if it is already installed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌─[user@laptop] – [~] – [Wed Feb 14, 15:19] | |
└─[$] <> brew install plantuml | |
Warning: plantuml 1.2024.1 is already installed and up-to-date. | |
To reinstall 1.2024.1, run: | |
brew reinstall plantuml |