Set JAVA_HOME as root OR user
I have java 1.8 on my red hat 7.7
When I login as root and type echo $JAVA_HOME , nothing to show
When I login with my server user and type the same command I can see JAVA_HOME path
Please help me to understand how is the best option here.
The beeter way is for all the user to see JAVA_HOME ? OR only users? OR only root?