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}",