I am trying to understand how classpath really works. After searching around the web this is where I have reached so far:
I have added
export CLASSP
The /etc/environment file is not a normal shell script; it is not executed as a shell script when you boot or login into your system. So running it with source /etc/environment does not the same as when you normally boot your system.
See: Ubuntu environment variables
/etc/environment- This file is specifically meant for system-wide environment variable settings. It is not a script file, but rather consists of assignment expressions, one per line. Specifically, this file stores the system-wide locale and path settings.