title: JAVA_HOME is not defined correctly on Ubuntu?
body: <p>I am trying to install some software (Shibboleth) in Ubuntu 14.04. I already have Java 7 OpenJDK installed in <code>/usr/lib/jvm/</code>, and I have these lines in <code>/usr/environment</code></p>
  
  <pre><code>JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64"
  export JAVA_HOME
  </code></pre>
  
  <p>If I type <code>echo $JAVA_HOME</code> I correctly get <code>/usr/lib/jvm/java-7-openjdk-amd64</code>.
  However, when I try to install Shibboleth I always get <code>Error: JAVA_HOME is not defined correctly. Cannot execute java</code>.</p>
  
  <p>Interestingly, if I type <code>java</code> command it works (it refers to /usr/lib/java which is a link to the right one). However, when I try to run <code>bash bin/install.sh</code> of Shibboleth, I get the JAVA_HOME error</p>
  
  <p>I already tried setting <code>JAVA_HOME</code> to the <code>jre</code> folder with same result. Any ideas?</p>