On Thu, Feb 12, 2009 at 5:09 PM, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> In a nutshell (not tested, but nothing should miss, just typos if it doesn't
> work) :
>
> mkdir test-compile
> cd test-compile
> mkdir classes
> mkdir src
> mkdir src/echo
> echo "(ns echo.test) (defn echo [msg] msg)" > src/echo/test.clj
> java -cp path/to/clojure.jar:src/:classes/ clojure.lang.Repl
> user> (compile 'echo.test)
> echo.test
> user> (echo.test/echo "ECHHHOOOO!!!")
> ECHHHOOOO!!!
> user>
>
> A classical error is to forget to put the classes/ folder in the classpath.
> This folder (as defined by default by the global var *compile-path*) is
> where clojure generates the class files, and where it the immediately tries
> to load them from : so it must be on the classpath.

The steps above work for me.

What if I have several source files with the namespace "echo.test"?
Where do I need to put those so that all of them are compiled when I
run (compile 'echo.test)? Do they need to be named specially? Maybe
what I'm trying to do isn't possible.

-- 
R. Mark Volkmann
Object Computing, Inc.

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