On Ubuntu systems, use the following locations:
System-wide persistent variables in the format of JAVA_PATH=/usr/local/java
store in
/etc/environment
System-wide persistent variables that reference variables such as
export PATH="$JAVA_PATH:$PATH"
store in
/etc/.bashrc
User specific persistent variables in the format of PATH DEFAULT=/usr/bin:usr/local/bin
store in
~/.pam_environment
For more details on #2, check this Ask Ubuntu answer. NOTE: #3 is the Ubuntu recommendation but may have security concerns in the real world.