# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 PortSystem 1.0 PortGroup github 1.0 github.setup jenv jenv 0.5.7 revision 0 categories java platforms any maintainers {breun.nl:nils @breun} openmaintainer license MIT supported_archs noarch description Master your Java environment with jEnv long_description jEnv is a command line tool to help you forget how to set the JAVA_HOME environment variable. homepage https://www.jenv.be github.tarball_from archive checksums rmd160 8acc65ef031a935ffa40bd64bda82157a0c4aaf9 \ sha256 5865f7839eda303467fb1ad3dfb606b31566001beeb05360f653905346c2624f \ size 22717 use_configure no build {} destroot { set target ${destroot}${prefix}/share/java/${name} # Create the target java directory xinstall -m 755 -d ${target} # Copy over the files foreach d { LICENSE README.md available-plugins bin completions fish libexec } { copy ${worksrcpath}/${d} ${target} } # Add symlink ln -s ../share/java/${name}/bin/jenv ${destroot}${prefix}/bin } 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. "