jenv (java/jenv) Updated: 8 months, 2 weeks ago Add to my watchlist

Master your Java environment with jEnv

jEnv is a command line tool to help you forget how to set the JAVA_HOME environment variable.

Version: 0.5.7 License: MIT GitHub
Maintainers breun
Categories java
Homepage https://www.jenv.be
Platforms any
Variants -

"jenv" depends on

build (1)

Ports that depend on "jenv"

No ports


Port notes

Add this line to your shell profile (~/.zshrc, ~/.bash_profile) to enable jEnv:

eval "$(jenv init -)"

Then open a new shell and enable the export plugin:

jenv enable-plugin export
exec $SHELL -l

Optional: install some openjdk* ports if you don't have Java yet:

sudo port install openjdk11 openjdk17

Add the Java installations to jEnv:

for d in /Library/Java/JavaVirtualMachines/*/Contents/Home; do jenv add $d; done

Set a global default Java:

jenv global 17

Set a local Java version for a specific directory:

cd /path/to/java/11/project
jenv local 11

See https://github.com/jenv/jenv for more information.


Port Health:

Loading Port Health

Installations (30 days)

6

Requested Installations (30 days)

5