title: Tomcat not running, "eval: /usr/lib/jvm/java-8-openjdk/bin/java: not found"
body: <p>I've installed Tomcat server on my Ubuntu desktop, and when I run it it says that Tomcat has started, but I can't browse the interface, so I made some research and found a problem in <code>logs/catalina.out</code> file:</p>
  
  <pre><code>/home/user/Programs/apache-tomcat-8.0.26/bin/catalina.sh: 1: eval: /usr/lib/jvm/java-8-openjdk/bin/java: not found
  ./bin/catalina.sh: 1: eval: /usr/lib/jvm/java-8-openjdk/bin/java: not found
  </code></pre>
  
  <p>I don't even have the <code>java-8-openjdk</code> file in the <code>jvm</code> directory, and the only things that it contains is:</p>
  
  <pre><code>lrwxrwxrwx 1 root root   24  22  2014 default-java -&gt; java-1.7.0-openjdk-amd64
  lrwxrwxrwx 1 root root   20  16 16:06 java-1.7.0-openjdk-amd64 -&gt; java-7-openjdk-amd64
  drwxr-xr-x 5 root root 4096  24 14:52 java-6-openjdk-amd64
  drwxr-xr-x 7 root root 4096   2 20:58 java-7-openjdk-amd64
  drwxr-xr-x 8 root root 4096  24 16:38 java-8-oracle
  </code></pre>
  
  <p>I've checked environmental variables and they look OK. What is the problem?</p>
  
  <p>EDIT:</p>
  
  <p>As I noticed Tomcat uses JRE_HOME instead of JAVA_HOME, instead of the fact that it is properly set, how to change it?</p>
  
  <pre><code>Using CATALINA_BASE:   /home/shota/Programs/apache-tomcat-8.0.26
  Using CATALINA_HOME:   /home/shota/Programs/apache-tomcat-8.0.26
  Using CATALINA_TMPDIR: /home/shota/Programs/apache-tomcat-8.0.26/temp
  Using JRE_HOME:        /usr/lib/jvm/java-8-openjdk
  Using CLASSPATH:       /home/shota/Programs/apache-tomcat-8.0.26/bin/bootstrap.jar:/home/shota/Programs/apache-tomcat-8.0.26/bin/tomcat-juli.jar
  Using CATALINA_PID:    /home/shota/Programs/apache-tomcat-8.0.26/tomcat.pid
  Existing PID file found during start.
  Removing/clearing stale PID file.
  Tomcat started.
  </code></pre>