From 6cdd04949d983b64258cfdfed5ade53dd06f6de5 Mon Sep 17 00:00:00 2001 From: Matjaz Gregoric Date: Sat, 25 Dec 2010 09:41:49 +0100 Subject: [PATCH] Switch from JAVA_OPTS to JVM_OPTS in windows batch scripts. Keep JAVA_OPTS for backwards compatibility. --- bin/lein.bat | 3 ++- resources/script-template.bat | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bin/lein.bat b/bin/lein.bat index 4fd9dff41..9f04b408c 100644 --- a/bin/lein.bat +++ b/bin/lein.bat @@ -65,6 +65,7 @@ set JLINE=jline.ConsoleRunner :SKIP_JLINE if "x%JAVA_CMD%" == "x" set JAVA_CMD="java" +if "x%JVM_OPTS%" == "x" set JVM_OPTS=%JAVA_OPTS% set CLOJURE_JAR=%USERPROFILE%\.m2\repository\org\clojure\clojure\1.2.0\clojure-1.2.0.jar goto RUN @@ -173,7 +174,7 @@ rem Need to disable delayed expansion because the %* variable rem may contain bangs (as in test!). setLocal DisableDelayedExpansion -%JAVA_CMD% -client %JAVA_OPTS% -Xbootclasspath/a:"%CLOJURE_JAR%" ^ +%JAVA_CMD% -client %JVM_OPTS% -Xbootclasspath/a:"%CLOJURE_JAR%" ^ -Dleiningen.original.pwd="%ORIGINAL_PWD%" ^ -cp %CLASSPATH% %JLINE% clojure.main -e "(use 'leiningen.core)(-main)" NUL %* goto EOF diff --git a/resources/script-template.bat b/resources/script-template.bat index b86c16ad0..5da5cc60e 100644 --- a/resources/script-template.bat +++ b/resources/script-template.bat @@ -1,6 +1,11 @@ @echo off +rem This script was automatically generated by Leiningen. + +setLocal + +if "x%%JVM_OPTS%%" == "x" set JVM_OPTS=%%JAVA_OPTS%% set CLASSPATH="%s" -java -cp "%%CLASSPATH%%" %%JAVA_OPTS%% ^ +java -cp "%%CLASSPATH%%" %%JVM_OPTS%% ^ clojure.main -e "(use '%s)(apply -main *command-line-args*)" NUL %%*