Reputation: 1524
java -cp clojure.jar clojure.main -i "hello.clj" -e "(hello 1)" is working with 1 as a parameter to hello function. java -cp clojure.jar clojure.main -i "hello.clj" -e "(hello "vik")" passing "vik' instead of number is throwing error.
Upvotes: 0
Views: 85
Reputation: 1524
java -cp clojure.jar clojure.main -i "hello.clj" -e '(hello "vik")' for windows, since double quote is conflicting.
Upvotes: 0
Reputation: 91544
You need to escape the quotation marks around vik. the Shell will interpret these before it starts java. java will see this:
java -cp clojure.jar clojure.main -i "hello.clj" -e "(hello " vik ")"
try
java -cp clojure.jar clojure.main -i "hello.clj" -e "(hello \"vik\")"
Upvotes: 1