> On Dec 8, 2014, at 9:02 AM, Ganesh Krishnamoorthy <ganesh....@gmail.com> 
> wrote:
> 
> I have been trying all my bit on to get my hello world working; Any help is 
> much appreciated...
> 
> am trying to run it by 
> java -cp clojure-1.6.0.jar clojure.main hey.clj
> I just get an empty line.
> Below is my file:
> 
> (defn -main
>   []
>   (println "Hello World!")
>   (println (- 1 1)))

That calling syntax for clojure.main executes the contents of the hey.clj file. 
Your file defines a -main function, but no code will call it. If you add a call 
to your main function, it runs:

        (-main)

There are other options for clojure.main.  There’s more info here: 
http://clojure.org/repl_and_main <http://clojure.org/repl_and_main> and here: 
http://www.beaconhill.com/blog/?p=283 <http://www.beaconhill.com/blog/?p=283>

—Steve

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to