Modulinos: Difference between revisions

Line 128:
Clojure has a function -main which will run in only three cases.
 
# clj is passed the flag -m <&lt;class&gt; <lang sh>$ clj -m scriptedmain
<lang sh>$ clj -m scriptedmain
Main: The meaning of life is 42</lang>
# A shebang forces -m <lang sh>$ ./scriptedmain.clj
<lang sh>$ ./scriptedmain.clj
Main: The meaning of life is 42</lang>
# The compiled class is run. <lang sh>$ java -cp ~/Library/Clojure/lib/clojure.jar:. scriptedmain
 
<lang sh>$ java -cp ~/Library/Clojure/lib/clojure.jar:. scriptedmain
Main: The meaning of life is 42</lang>
 
Anonymous user