better check for defaults on jline, only enable it if not on windows

This commit is contained in:
Shay Banon 2011-09-09 10:59:35 +03:00
parent 3fa08968a2
commit d00edfb165
2 changed files with 3 additions and 4 deletions

View File

@ -47,8 +47,6 @@ REM The path to the heap dump location, note directory must exists and have enou
REM space for a full heap dump.
REM JAVA_OPTS=%JAVA_OPTS% -XX:HeapDumpPath=$ES_HOME/logs/heapdump.hprof
set JAVA_OPTS=%JAVA_OPTS% -Djline.enabled=false
set ES_CLASSPATH=%ES_CLASSPATH%;%ES_HOME%/lib/*;%ES_HOME%/lib/sigar/*
set ES_PARAMS=-Delasticsearch -Des-foreground=yes -Des.path.home="%ES_HOME%"

View File

@ -31,6 +31,7 @@ import org.elasticsearch.common.jna.Natives;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.logging.log4j.LogConfigurator;
import org.elasticsearch.common.os.OsUtils;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.env.Environment;
import org.elasticsearch.monitor.jvm.JvmInfo;
@ -142,8 +143,8 @@ public class Bootstrap {
Bootstrap bootstrap = new Bootstrap();
String pidFile = System.getProperty("es-pidfile");
// enable jline by default when running form "main"
if (System.getProperty("jline.enabled") == null) {
// enable jline by default when running form "main" (and not on windows)
if (System.getProperty("jline.enabled") == null && !OsUtils.WINDOWS) {
System.setProperty("jline.enabled", "true");
}