From a2818331fc9101a91bba0e2cf858135090936089 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 29 May 2019 12:18:04 -0700 Subject: [PATCH] Set absolute path to 'java' EXE. --- .../src/main/groovy/build/GemFireServerPlugin.groovy | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/buildSrc/src/main/groovy/build/GemFireServerPlugin.groovy b/buildSrc/src/main/groovy/build/GemFireServerPlugin.groovy index e47d11a..54d0a56 100644 --- a/buildSrc/src/main/groovy/build/GemFireServerPlugin.groovy +++ b/buildSrc/src/main/groovy/build/GemFireServerPlugin.groovy @@ -68,10 +68,16 @@ class GemFireServerPlugin implements Plugin { def err = debug ? System.err : new StringBuilder() String classpath = project.sourceSets.main.runtimeClasspath.collect { it }.join(File.pathSeparator) - String gemfireLogLevel = System.getProperty('spring.session.data.geode.log-level', 'warning') + String gemfireLogLevel = System.getProperty('spring.data.gemfire.cache.log-level', 'warning') + String javaHome = System.getProperty("java.home"); + + javaHome = javaHome == null || javaHome.isEmpty() ? System.getenv("JAVA_HOME") : javaHome; + javaHome = javaHome.endsWith(File.separator) ? javaHome : javaHome.concat(File.separator); + + String javaCommand = javaHome + "bin" + File.separator + "java"; String[] commandLine = [ - 'java', '-server', '-ea', '-classpath', classpath, + javaCommand, '-server', '-ea', '-classpath', classpath, //"-Dgemfire.log-file=gemfire-server.log", "-Dgemfire.log-level=" + gemfireLogLevel, "-Dspring.session.data.geode.cache.server.port=${port}",