Java for Mac
OpenJDK 21 with Maven, Gradle, and PostgreSQL.
Java development tools
$(...) captures the download in script. && runs Bash only if the download succeeds. Nothing runs while the download is in progress.
The outer parentheses keep that variable out of your current shell. This does not verify the downloaded code; use Download before running to inspect it first.
Copy command Open Terminal Paste Run
- Copy command Review, then click Copy.
- Open Terminal Command + Space to open Spotlight Type Terminal, then Return
- Paste Command + V
- Run Return Follow the prompts.
(script="$(curl -fsSL https://maci.sh/install/java.sh)" && /bin/bash -c "$script") Read the script macOS / zsh
Included
- Xcode CLT
- Homebrew
- Git
- OpenJDK 21
- Maven
- Gradle
- PostgreSQL 16
Download before running
This command downloads the script for inspection. It does not run the installer.
curl -fsSL https://maci.sh/install/java.sh -o macish-java.sh After reviewing the file, run it separately:
bash macish-java.sh Sets JAVA_HOME and adds OpenJDK 21 to your zsh PATH.
Starts PostgreSQL as a Homebrew service.