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.
2 Answers
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\")"
1 Comment
vikbehal
this is still giving error, java -cp clojure.jar clojure.main -i "hello.clj" -e '(hello "vik")' is working fine. (on windows)
(use 'user)