title: Unknown CMake command "add_jar" when trying to compile Java
body: <p>As I understand, cmake supports java since version 2.8.6. I have found the command add_jar but I can't seem to get it to work. My CMakeLists.txt looks like this:</p>
  
  <pre><code>cmake_minimum_required(VERSION 2.8.10)
  find_package(Java)
  
  FILE(GLOB source
      "${CMAKE_CURRENT_SOURCE_DIR}/*.java"
  )
  
  add_jar(hello ${source})
  </code></pre>
  
  <p>And when I run cmake I get this:</p>
  
  <pre><code>-- The C compiler identification is GNU 4.7.3
  -- The CXX compiler identification is GNU 4.7.3
  -- Check for working C compiler: /usr/bin/cc
  -- Check for working C compiler: /usr/bin/cc -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++
  -- Check for working CXX compiler: /usr/bin/c++ -- works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Found Java: /usr/bin/java (found version "1.7.0.25") 
  CMake Error at CMakeLists.txt:8 (add_jar):
    Unknown CMake command "add_jar".
  
  
  -- Configuring incomplete, errors occurred!
  </code></pre>
  
  <p>What am I missing here?</p>