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_PATHorJAVA_HOME? You assign one but mention the other in theecho. – ilkkachu Mar 13 '19 at 22:15/etc/profile. – Ivy Growing Dec 16 '21 at 07:32