macOS Catalina 10.15(beta) - Why is ~/.bash_profile not sourced by my shell?

I want to set the environment variable I added below the line to ~/.bash_profile and ~/.profile but it didn't work.

export JBOSS_HOME=/Users/{USERNAME}/Desktop/jboss7

Afterward, exit the terminal and open it again when executing echo $JBOSS_HOME I get nothing.
enter image description here


Solution 1:

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.

Solution 2:

If you for some reason (as me) don't want to rename/move your ~/.bash_profile file you can do the next things:

  1. Create a new file ~/.zprofile
  2. Type there source ~/.bash_profile
  3. Save and close
  4. Run a new terminal session