title: Set custom Java version for CMake
body: <p>I am trying to install a Tool (SciDB); its installing procedure makes use of CMake. At a certain point it requires Java 1.8, which is not installed on the system.</p>
  
  <pre><code>-- Could NOT find Java (missing:  Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE) 
  CMake Error at src/jdbc/CMakeLists.txt:5 (message):
    Java 1.8 is currently the only supported version for building JDBC!
  </code></pre>
  
  <p>I installed it somewhere in my home folder; how to tell CMake to use my version?</p>
  
  <p>I tried to set the <code>$JAVA_HOME</code> and <code>$PATH</code> variable as suggested  <a href="https://stackoverflow.com/questions/19908262/cmake-cant-find-java-but-its-installed">in this previous answer</a>, but got no results.</p>