title: Not sure if JAVA_HOME is set
body: <p>I have installed Maven on Ubuntu 12.04. The following is the output when I do </p>
  
  <pre><code>$ mvn --version
  
  Listening for transport dt_socket at address: 8787
  Apache Maven 3.0.4
  Maven home: /usr/share/maven
  Java version: 1.6.0_38, vendor: Sun Microsystems Inc.
  Java home: /usr/lib/jvm/jdk1.6.0_38/jre
  Default locale: en_IN, platform encoding: UTF-8
  OS name: "linux", version: "3.2.0-52-generic", arch: "amd64", family: "unix"
  </code></pre>
  
  <p>but when I do</p>
  
  <pre><code>$ gedit /etc/environment
  </code></pre>
  
  <p>the output is </p>
  
  <pre><code>PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" 
  </code></pre>
  
  <p>also the .bash_rc does not have any entry for JAVA_HOME and there is no .bash_profile file.</p>
  
  <p><strong>My Question</strong></p>
  
  <p>If JAVA_HOME is not set how <code>mvn --version</code> is showing a value of it?</p>