From 30cdd4c03b2d5df599e0ca86c5811ea88389970c Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 14 May 2015 00:09:44 -0400 Subject: [PATCH] Use our provided JNA library, versus one installed on the system which might be older and not work. --- bin/elasticsearch.in.bat | 3 +++ bin/elasticsearch.in.sh | 3 +++ pom.xml | 1 + 3 files changed, 7 insertions(+) diff --git a/bin/elasticsearch.in.bat b/bin/elasticsearch.in.bat index 0e77e19ee87..7a6bfda37ad 100644 --- a/bin/elasticsearch.in.bat +++ b/bin/elasticsearch.in.bat @@ -85,5 +85,8 @@ set JAVA_OPTS=%JAVA_OPTS% -XX:+DisableExplicitGC REM Ensure UTF-8 encoding by default (e.g. filenames) set JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8 +REM Use our provided JNA always versus the system one +set JAVA_OPTS=%JAVA_OPTS% -Djna.nosys=true + set ES_CLASSPATH=%ES_CLASSPATH%;%ES_HOME%/lib/${project.build.finalName}.jar;%ES_HOME%/lib/*;%ES_HOME%/lib/sigar/* set ES_PARAMS=-Delasticsearch -Des-foreground=yes -Des.path.home="%ES_HOME%" diff --git a/bin/elasticsearch.in.sh b/bin/elasticsearch.in.sh index 1e3af46761d..af68857e0eb 100644 --- a/bin/elasticsearch.in.sh +++ b/bin/elasticsearch.in.sh @@ -68,3 +68,6 @@ JAVA_OPTS="$JAVA_OPTS -XX:+DisableExplicitGC" # Ensure UTF-8 encoding by default (e.g. filenames) JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8" + +# Use our provided JNA always versus the system one +JAVA_OPTS="$JAVA_OPTS -Djna.nosys=true" diff --git a/pom.xml b/pom.xml index cc0f43de08d..bd088288581 100644 --- a/pom.xml +++ b/pom.xml @@ -469,6 +469,7 @@ -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC -Dfile.encoding=UTF-8 + -Djna.nosys=true -Delasticsearch