diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -201,6 +201,7 @@
                       "--extra-include-dirs=" ++ javaHome ++ "/include/darwin",
                       "--ghc-option=-optc-DFFIJNI_LIBJVM=" ++ libjvmPath]
 
+
 configure args Linux = do
     -- In Linux we find out where javac lives and resolve all
     -- symlinks until we find the JDK home.
@@ -212,18 +213,25 @@
     rawSystemExit normal "javac" ["GetProperty.java"]
 
     javaArch <- rawSystemStdout normal "java" ["GetProperty", "os.arch"]
-	>>= return . head . lines
+	    >>= return . head . lines
 
+    notice normal $ "os.arch is " ++ javaArch
+
     libjvmPath <- getEnvironment >>= return . lookup "FFIJNI_LIBJVM"
         >>= maybe (return $ javaHome ++ "/jre/lib/" ++ javaArch ++ "/server/libjvm.so") return
 
     notice normal $ "JAVA_HOME=" ++ javaHome
     notice normal $ "FFIJNI_LIBJVM=" ++ libjvmPath
 
+    findFirstFile id [javaHome ++ "/include/jni.h"]
+        >>= maybe (fail $ "jni.h was not found in " ++ javaHome ++ "/include")
+                  (return . const ())
+
     return $ args ++ ["--extra-include-dirs=" ++ javaHome ++ "/include",
                       "--extra-include-dirs=" ++ javaHome ++ "/include/linux",
                       "--ghc-option=-optc-DFFIJNI_LIBJVM=" ++ libjvmPath]
 
+
 configure args Windows = do
     -- The strategy for finding a JDK in Windows is rather simplistic.
     -- Typically the JDK is installed in %ProgramFiles%/Java, so we look
@@ -241,6 +249,10 @@
 
     notice normal $ "JAVA_HOME=" ++ javaHome
     notice normal $ "FFIJNI_LIBJVM=" ++ libjvmPath
+
+    findFirstFile id [javaHome ++ "/include/jni.h"]
+        >>= maybe (fail $ "jni.h was not found in " ++ javaHome ++ "/include")
+                  (return . const ())
 
     return $ args ++ ["--extra-include-dirs=" ++ javaHome ++ "/include",
                       "--extra-include-dirs=" ++ javaHome ++ "/include/win32",
diff --git a/java-bridge.cabal b/java-bridge.cabal
--- a/java-bridge.cabal
+++ b/java-bridge.cabal
@@ -1,5 +1,5 @@
 name:           java-bridge
-version:        0.20130606
+version:        0.20130606.1
 
 license:        MIT
 license-file:   LICENSE
@@ -155,8 +155,8 @@
 
 
 Library
-    cc-options:         -DFFIJNI_BRIDGE_VERSION="0.20130606"
-    cpp-options:        -DFFIJNI_BRIDGE_VERSION="0.20130606"
+    cc-options:         -DFFIJNI_BRIDGE_VERSION="0.20130606.1"
+    cpp-options:        -DFFIJNI_BRIDGE_VERSION="0.20130606.1"
 
     build-depends:      base >= 4.5 && < 5
                         , directory >= 1.1.0.2
