title: Intellij IDEA Java project and JNI
body: <p>Is it possible for the pure Java project, created at Intellij IDEA, to use .so files (like Android project does)?</p>
  
  <p>Surfing over internet I can not find any information about it. Sounds very strange.</p>
  
  <p>UPDATE:</p>
  
  <p>What I have in Android is a simple script:</p>
  
  <pre><code>def ndkBuild;
  def ndkBuildingDir = mainSrcDir;
  def hasNdk = false;
  if (System.env.ANDROID_NDK_HOME != null) {
      hasNdk = true;
      ndkBuild = new File(System.env.ANDROID_NDK_HOME, ndkBuildFilename())
  }
  
  commandLine ndkBuild, "--directory", ndkBuildingDir, "APP_BUILD_SCRIPT=${ndkBuildingDir}/native/Android.mk", "NDK_APPLICATION_MK=${ndkBuildingDir}/native/Application.mk"
  </code></pre>
  
  <p>And I can not found any documentation of doing such things at Java project.</p>