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
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
– ricardoramos Aug 10 '15 at 19:03$ echo $JAVA_HOME
show/usr/lib/jvm/java-8-oracle/
and$ echo $M2_HOME
show/usr/share/maven/
. Because my Java code does not display the environment variables $ JAVA_HOME and $ M2_HOME? Java Code: http://javarevisited.blogspot.in/2012/08/how-to-get-environment-variables-in.html – ricardoramos Aug 10 '15 at 19:13