Java Development
Set up a Java development environment with jenv and Homebrew
Configuration
[
{ "type": "homebrew" },
{
"type": "jenv",
"global": "21",
"add": [
"21"
]
}
]What Gets Installed
This configuration installs jenv (Java Environment Manager), a popular tool for managing multiple Java versions on your system. Unlike nvm or pyenv, jenv cannot install Java versions by itself—it only manages versions that are already installed.
Codify's core plugin extends jenv's functionality by automatically installing Java versions via Homebrew when needed.
This configuration will:
- Install Homebrew (if not already present)
- Install jenv
- Install Java 21 via Homebrew
- Configure jenv to manage Java 21
- Set Java 21 as the system default
Usage
After installation, you can:
- Check the Java version:
java -version - Switch Java versions:
jenv global <version>orjenv local <version> - Install additional versions: Add them to the
addarray - Change the default version: Update the
globalproperty