I'm trying to set the environment variables in shell script. The command "source .bashrc" is not executed. As long as type the last line in the terminal, everything works fine. What's wrong with my script? thx.
echo "export CLASSPATH=.:$HOME/java/lib
export JAVA_HOME=$HOME/java
export PATH=.:$PATH:$JAVA_HOME/bin" >> .bashrc
source .bashrc