diff --git a/hadoop-common-project/hadoop-common/src/main/native/configure.ac b/hadoop-common-project/hadoop-common/src/main/native/configure.ac index debd8f2cc1a..4f9e63100e7 100644 --- a/hadoop-common-project/hadoop-common/src/main/native/configure.ac +++ b/hadoop-common-project/hadoop-common/src/main/native/configure.ac @@ -57,6 +57,8 @@ JNI_LDFLAGS="" if test $JAVA_HOME != "" then JNI_LDFLAGS="-L$JAVA_HOME/jre/lib/$OS_ARCH/server" + JVMSOPATH=`find $JAVA_HOME/jre/ -name libjvm.so | head -n 1` + JNI_LDFLAGS="$JNI_LDFLAGS -L`dirname $JVMSOPATH`" fi LDFLAGS="$LDFLAGS $JNI_LDFLAGS" AC_CHECK_LIB([jvm], [JNI_GetCreatedJavaVMs])