Drop the $(...)
bit, which would attempt to execute the command within the brackets and set $MULE_HOME
to whatever it produces. In your case /opt/mule-standalone-3.4.0
is not an executable, hence the error you are getting.
export MULE_HOME=/opt/mule-standalone-3.4.0
and use ~/.bashrc
not ~/.bash_profile
.
EDIT: It seems opinion is that you should set environment variables in your ~/.bash_profile
script, and not ~/.bashrc
script.