1

When I run echo $PATH I always get Ruby or RVM bin files and does not get any of the path I added in my .bash_profile; I am using a MacBook Pro and running Catalina. I am using the default terminal to review my Path .. I checked .bashprofile, .profile and also .bashrc, what could be wrong here?

echo $PATH results :

/Users/rr/.rvm/gems/ruby-2.7.0/bin:/Users/rr/.rvm/gems/ruby-2.7.0@global/bin:/Users/rr/.rvm/rubies/ruby-2.7.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMwareFusion.app/Contents/Public:/Users/rr/.rvm/bin

rr@rr-MacBook-Pro ~ % echo $CLASSPATH -- returns null value

.Bash_profile :

#export JAVA_HOME=$(/usr/libexec/java_home)
export JAVA_HOME=$PATH:/Library/Java/JavaVirtualMachines/jdk-13.0.2.jdk/Contents/Home
export M2_HOME=$PATH:/usr/local/Cellar/maven/3.6.3_1
#export PATH=$PATH:$M2_HOME/bin
#export TOMCAT_HOME=$PATH:/usr/local/apache-tomcat-9.0.31
#export PATH=$PATH:$TOMCAT_HOME/bin
#export PATH=$PATH:$JAVA_HOME/bin
export PATH=$PATH:/Library/PostgreSQL/12/bin
export CLASSPATH=$CLASSPATH:/Library/PostgreSQL/12/bin
2
  • 2
    Catalina uses zsh instead of bash as the default interactive shell (for new accounts); zsh doesn't pay any attention to your ~/.bash* files, it reads ~/.zprofile, ~/.zshrc, etc instead. I suspect you need to either switch to bash (see Apple Support document HT208050: Use zsh as the default shell on your Mac) or move your setup commands to ~/.z* files. Commented May 4, 2020 at 3:21
  • 3
    Which shell are you using (run echo $SHELL)?
    – nohillside
    Commented May 4, 2020 at 6:20

1 Answer 1

1

I followed the steps provided in the Apple website on how to change the shell and restarted my Terminal app as a Bash shell instead of zsh shell - then I was able to verify the Class path and the PATH Environment variables without any issues

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .