Simple way to add system variable to OSx

one simple way to add system variables to OSx is to include them in .zshrc file from your home ~

vim ~/.zshrc 

and in there the new variable and also include it into $PATH

eg: with JAVA_HOME

export JAVA_HOME="/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home"

export PATH="$JAVA_HOME:$PATH"

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.