I added the following in /etc/profile
so that all my users can see the path
export JAVA_HOME=/opt/jdk11
export PATH=$PATH:$JAVA_HOME/bin
But after restarting my laptop, I cannot see the changes using echo $JAVA_PATH
. I thought there is an order for how the scripts are loaded. and Also, If I was to add this changes into a separate sh
file in /etc/profile.d
, it's supposed to do the same. So why is it that it's failing to see the path changes.
JAVA_PATH
orJAVA_HOME
? You assign one but mention the other in theecho
./etc/profile
.