Re: how do I create a runnable clojure program

2009-04-29 Thread e
incidentally, I seem to remember that the enclojure netbeans plugin does all this for you, and even outputs the exact command you need to run to execute. a default project starts with such a -main. That said, it's probably not a good way to really understand what's going on ... if that's a goal.

Re: how do I create a runnable clojure program

2009-04-29 Thread Santanu
Thanks everyone for your suggestions. I somehow managed to compile my first clojure program, generating a class file that I could run using java. I started with the overview provided by Stuart Sierra, and read the article pointed by Raphaël. Didn't work at first, but after some trial and error, it

Re: how do I create a runnable clojure program

2009-04-29 Thread Rayne
Not really, he just needs decent instructions. :p I don't know a line of Java. I figured it out. :) On Apr 29, 9:15 am, Stuart Sierra wrote: > Hi Santanu, > Unfortunately, this is not a well-documented area, but it is > possible.  Here's the high-level view, but don't expect these > instructions

Re: how do I create a runnable clojure program

2009-04-29 Thread rb
On Apr 29, 1:04 pm, Santanu wrote: > Hi Everybody, > > I wanted to compile a .clj clojure file into a .jar/.class file so > that I could run it using java. (I don't know what is the actual way > to run clojure file. So far, I have only been trying it from within > emacs/slime). > > But I don't

Re: how do I create a runnable clojure program

2009-04-29 Thread tmountain
There was a very recent thread on the list related to the same question: http://groups.google.com/group/clojure/browse_thread/thread/750e5795141cff35# HTH, Travis On Apr 29, 7:04 am, Santanu wrote: > Hi Everybody, > > I wanted to compile a .clj clojure file into a .jar/.class file so > that I

Re: how do I create a runnable clojure program

2009-04-29 Thread Stuart Sierra
Hi Santanu, Unfortunately, this is not a well-documented area, but it is possible. Here's the high-level view, but don't expect these instructions to be sufficient: 1. Put (:gen-class) in the (ns...) declaration in your .clj file. 2. Add a -main function like: (defn -main [& args] ...) 3. Com

how do I create a runnable clojure program

2009-04-29 Thread Santanu
Hi Everybody, I wanted to compile a .clj clojure file into a .jar/.class file so that I could run it using java. (I don't know what is the actual way to run clojure file. So far, I have only been trying it from within emacs/slime). But I don't know how to create the .class/.jar file. I also don'