I want to set the environment variable I added below the line to ~/.bash_profile and ~/.profile but it didn\'t work.
export JBOSS_H
you don't need to update the file, zsh is mac's default, put this in terminal. e.g.:
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
Apple has changed the default shell to zsh. Therefore you have to rename your configuration files. .bashrc is now .zshrc and .bash_profile is now .zprofile.
You can create a simbolic link and keep your .bash_profile file with this:
ln -s .bash_profile .zsh_profile
source .zsh_profile
Any changes in .bash_profile will be reflected in .zsh_profile