Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-2639 bin/nutch fails to set native library path on Cygwin causing jobs to fail with UnsatisfiedLinkError Pick fix contributed by rustyx for 2.x

rustyx566f3fbe5b9d
diff --git a/src/bin/nutch b/src/bin/nutch
index 70e1415eb..ab1df073d 100755
--- a/src/bin/nutch
+++ b/src/bin/nutch
@@ -173,10 +173,9 @@ fi
# used only in local mode
JAVA_LIBRARY_PATH=''
if [ -d "${NUTCH_HOME}/lib/native" ]; then
+ JAVA_PLATFORM=`"${JAVA}" -classpath "$CLASSPATH" org.apache.hadoop.util.PlatformName | sed -e 's/ /_/g' -e 's/\r//g'`
- JAVA_PLATFORM=`"${JAVA}" -classpath "$CLASSPATH" org.apache.hadoop.util.PlatformName | sed -e 's/ /_/g'`
-
- if [ -d "${NUTCH_HOME}/lib/native" ]; then
+ if [ -d "${NUTCH_HOME}/lib/native/${JAVA_PLATFORM}" ]; then
if [ "x$JAVA_LIBRARY_PATH" != "x" ]; then
JAVA_LIBRARY_PATH="${JAVA_LIBRARY_PATH}:${NUTCH_HOME}/lib/native/${JAVA_PLATFORM}"
else