Skip to content

Commit

Permalink
Switch from JAVA_OPTS to JVM_OPTS in windows batch scripts.
Browse files Browse the repository at this point in the history
Keep JAVA_OPTS for backwards compatibility.
  • Loading branch information
mtyaka committed Dec 25, 2010
1 parent b4943e1 commit 6cdd049
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion bin/lein.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion resources/script-template.bat
Original file line number Diff line number Diff line change
@@ -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 %%*

0 comments on commit 6cdd049

Please sign in to comment.