I see many online tutorials for ubuntu, and some of them are using export= in the beginning of the script for system variables.
for example:
export JAVA_HOME=/usr/local/java/jdk1.8.0_05
export CATALINA_HOME=/ubuntuland/utils/apache-tomcat-8.0.8
See this tutorial
I am trying to understand the logic - as it makes sense to me that they will use system variables and not define their owns.
EDIT
when I write:
echo $JAVA_HOME
in the shell I see the correct content, in any shell, at any time of the server (even after reboot)