title: cmake can't find java, but it's installed
body: <p>I am trying to build a project with cmake. This project is using java among other things.
  The problem is that at the code</p>
  
  <pre><code>find_package(Java REQUIRED)
  </code></pre>
  
  <p>I receive the following error:</p>
  
  <pre><code>CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108
  (message):
  
  Could NOT find Java (missing: Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE
  Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE)
  
  Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindJava.cmake:195 (find_package_handle_standard_args)
  CMakeLists.txt:66 (find_package)
  </code></pre>
  
  <p>Though </p>
  
  <pre><code>which java
  </code></pre>
  
  <p>outputs</p>
  
  <pre><code>/usr/bin/java
  </code></pre>
  
  <p>How come? What can be the reason of this error?</p>