title: CMake cannot find Java on Linux "Could NOT find Java (missing: Java_JAVAH_EXECUTABLE)"
body: <p>I'm encountering a CMake error suggesting it cannot find Java (JDK I think?):</p>
  <pre><code>Could NOT find Java (missing: Java_JAVAH_EXECUTABLE) (found version
    &quot;1.8.0_181&quot;)
  </code></pre>
  <p>However, when I run:</p>
  <pre><code>which javac
  </code></pre>
  <p>I get:</p>
  <pre><code>/bin/javac
  </code></pre>
  <p>but setting:</p>
  <pre><code>export JAVA_HOME=/bin/javac
  </code></pre>
  <p>and re-compiling does not solve the problem.</p>
  <p>Anybody encountered this before?</p>