You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by kl...@apache.org on 2016/06/07 21:53:02 UTC

[03/17] incubator-geode git commit: GEODE-1331: gfsh.bat on Windows is incorrect.

GEODE-1331: gfsh.bat on Windows is incorrect.

* Renamed internal variable from CLASSPATH to DEPENDENCIES.
* Verified @setlocal was not altering the System environment variables for the shell.
* Launch with -classpath param like the bash script does.
* Ensured command-line arguments match bash script's order of arguments.
* This closes #149


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/8e21638c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/8e21638c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/8e21638c

Branch: refs/heads/feature/GEODE-837
Commit: 8e21638ce336aee07bec33d140500c76d1cedc53
Parents: 41d9cff
Author: Kevin J. Duling <kd...@pivotal.io>
Authored: Thu May 26 09:46:03 2016 -0700
Committer: Jinmei Liao <ji...@pivotal.io>
Committed: Mon Jun 6 09:05:07 2016 -0700

----------------------------------------------------------------------
 geode-assembly/src/main/dist/bin/gfsh.bat | 33 +++++++++++++-------------
 1 file changed, 16 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8e21638c/geode-assembly/src/main/dist/bin/gfsh.bat
----------------------------------------------------------------------
diff --git a/geode-assembly/src/main/dist/bin/gfsh.bat b/geode-assembly/src/main/dist/bin/gfsh.bat
index 6813243..706146a 100755
--- a/geode-assembly/src/main/dist/bin/gfsh.bat
+++ b/geode-assembly/src/main/dist/bin/gfsh.bat
@@ -37,25 +37,22 @@ REM echo %scriptdir%
 :gfok
 @set GEMFIRE=%gf%
 
-@set GEMFIRE_JARS=%GEMFIRE%\lib\gfsh-dependencies.jar
+@set GFSH_JARS=%GEMFIRE%\lib\gfsh-dependencies.jar
+REM if a system level classpath is set, append it to the classes gfsh will need
 @if defined CLASSPATH (
-@set GEMFIRE_JARS=%GEMFIRE_JARS%;%CLASSPATH%
+    @set DEPENDENCIES=%GFSH_JARS%;%CLASSPATH%
+) else (
+    @set DEPENDENCIES=%GFSH_JARS%
 )
 
 @if not defined GF_JAVA (
-@REM %GF_JAVA% is not defined, assume it is on the PATH
-@if defined JAVA_HOME (
-@set GF_JAVA=%JAVA_HOME%\bin\java.exe
+REM %GF_JAVA% is not defined, assume it is on the PATH
+    @if defined JAVA_HOME (
+    @set GF_JAVA=%JAVA_HOME%\bin\java.exe
 ) else (
-@set GF_JAVA=java
+    @set GF_JAVA=java
+  )
 )
-) 
-
-REM
-REM GFSH_JARS
-REM
-@set GFSH_JARS=;%GEMFIRE%\lib\gfsh-dependencies.jar
-@set CLASSPATH=%GFSH_JARS%;%GEMFIRE_JARS%
 
 REM
 REM Copy default .gfshrc to the home directory. Uncomment if needed.
@@ -71,17 +68,19 @@ REM @if not exist "%USERPROFILE%\.gemfire" (
 REM @mkdir "%USERPROFILE%\.gemfire"
 REM )
 
-REM  Consider java is from JDK
+REM  Expect to find the tools.jar from the JDK
 @set TOOLS_JAR=%JAVA_HOME%\lib\tools.jar
 @IF EXIST "%TOOLS_JAR%" (
-    @set CLASSPATH=%CLASSPATH%;%TOOLS_JAR%
+    @set DEPENDENCIES=%DEPENDENCIES%;%TOOLS_JAR%
 ) ELSE (
     set TOOLS_JAR=
 )
 
 @set LAUNCHER=com.gemstone.gemfire.management.internal.cli.Launcher
 @if defined JAVA_ARGS (
-@set JAVA_ARGS="%JAVA_ARGS%"
+    @set JAVA_ARGS="%JAVA_ARGS%"
 )
-@"%GF_JAVA%" -Dgfsh=true -Dlog4j.configurationFile=classpath:log4j2-cli.xml %JAVA_ARGS% %LAUNCHER% %*
+
+REM Call java with our classpath
+@"%GF_JAVA%" -Dgfsh=true -Dlog4j.configurationFile=classpath:log4j2-cli.xml -classpath %DEPENDENCIES% %JAVA_ARGS% %LAUNCHER% %*
 :done