Hi,

If I remember correctly and if it has not changed since, for the
second solution (where there is the classes folder - which I would
recommand btw, aka not mixing source folders and compilation artifacts
folders -), the classes folder (or any other name you could set
*compile-path* to) also *must* be in the classpath (via the -cp
directive)

>From the doc at http://clojure.org/compilation :
"A loader classfile will produced in my/domain/lib__init.class, under
*compile-path*, which must be in the classpath"
(note : "which must be in the classpath)

HTH,

-- 
Laurent

2009/6/23 Thibaut Barrère <thibaut.barr...@gmail.com>:
>
> Hi,
>
> I found instructions about how to compile from the REPL very quickly,
> but it took me longer to manage to compile from the command-line. I'm
> sharing it here in case it's useful to someone else.
>
> To compile a .clj file, I've used this:
>
> java -cp libs/clojure-1.0.0.jar:. clojure.main -e "(set! *compile-
> path* \".\") (compile 'Hello)"
>
> (if Hello.clj is in current path)
>
> If you don't want to tweak *compile-path*, you'll have to create a
> classes folder first, then
>
> java -cp libs/clojure-1.0.0.jar:. clojure.main -e "(compile 'Hello)"
>
> btw - if there is a better way to achieve this, I'm ready to learn :)
>
> cheers,
>
> -- Thibaut
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to