Ok, this seems to work... (ns localhost.test)
(clojure.main/main (println "Hello!")) I then assume I'd use the special form "do" to perform multiple unrelated tasks, such as... (clojure.main/main (do (println "Hello!") (println "Cheeso!"))) At least I can now build and run a script. On Feb 1, 6:40 pm, ataggart <alex.tagg...@gmail.com> wrote: > You can generate a Java class with a main method (as you have done), > or you can use clojure.main: > > http://clojure.org/repl_and_main > > On Jan 31, 2:32 pm, Wardrop <t...@tomwardrop.com> wrote: > > > I'm having trouble finding any resources on the net for telling me how > > to initiate a Clojure application. I'm currently using Netbeans with a > > Clojure plugin, and from what I gather from one of the examples, I > > need to define a main function as the launching point for my app, but > > there seems to be a little more to it. > > > The only example code I've found which works is this... > > > (ns localhost.test > > (:gen-class)) > > > (defn -main > > ([greetee] > > (println (str "Hello " greetee "!"))) > > ([] (-main "world"))) > > > Could someone step me through the idea behind the -main function > > (which I've also seen written as just "main" without the hyphen). I'm > > new to the JVM so I'm basically learning both Clojure and the workings > > of the JVM at the same time. -- 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