My environment variables are correct? What is the correct way to use them in Ubuntu? I put them at the end of .bashrc file or edit the end of /etc/environment to able to use the $JAVA_HOME and $M2_HOME configuration and on my user?
$JAVA_HOME
JAVA_HOME="/usr/lib/jvm/java-8-oracle/"
CLASSPATH="JAVA_HOME/lib/:$CLASSPATH"
PATH="$JAVA_HOME/bin/:$PATH"
$M2_HOME
M2_HOME="/usr/share/maven/"
M2="$M2_HOME/bin"
PATH="$M2:$PATH"
PATH=$M2:$PATH