This guide will walk you through setting up the Elements Local SDK on a Mac. You’ll install the required dependencies using Homebrew or manually, and optionally use IntelliJ IDEA as your IDE.
🛠 Manual Step-by-Step Installation #
1. Install Homebrew (if not already installed) #
Homebrew is the recommended package manager for macOS.
Open Terminal and run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
After installation, run:
brew doctor
2. Install OpenJDK #
Install OpenJDK 21(or later):
brew install openjdk@21
You may need to add the following to your shell profile (~/.zshrc, ~/.bash_profile, or similar):
export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH"
export CPPFLAGS="-I/opt/homebrew/opt/openjdk@17/include"
Apply the changes:
source ~/.zshrc # or your corresponding shell config
Verify the installation:
java -version
3. Install Maven #
brew install maven
Verify it’s installed:
mvn -version
4. Install Git (if not already installed) #
brew install git
5. Install IntelliJ IDEA (Optional but Recommended) #
You can install IntelliJ IDEA via Homebrew:
brew install --cask intellij-idea
Or download from:
👉 https://www.jetbrains.com/idea/download/
6. Clone and Import the Example Project #
Clone the Elements example project:
git clone https://github.com/NamazuStudios/element-example.git
Then:
- Open IntelliJ IDEA
- Click Open and select the
element-exampledirectory - If prompted, import as a Maven project
- If not prompted, right-click
pom.xmland select Add as Maven Project
7. Run the Local SDK #
- In IntelliJ, navigate to the
dev.getelements.sdk.localpackage - Locate and run the
LocalSdkMainclass (or the appropriate main class) - The local server should boot up and be accessible for testing
⚡ Full Setup Script (For Convenience) #
Paste the following into Terminal to install everything in one shot:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install openjdk@21 maven git
brew install --cask intellij-idea
Then update your shell profile:
echo 'export PATH="/opt/homebrew/opt/openjdk@21/bin:$PATH"' >> ~/.zshrc
echo 'export CPPFLAGS="-I/opt/homebrew/opt/openjdk@21/include"' >> ~/.zshrc
source ~/.zshrc
✅ You’re Ready #
Once you’ve completed the setup:
- You can build and run the Elements example project locally
- You’re now ready to begin backend development using the Elements SDK

