Mark Volkmann wrote:
> I'm trying AOT compilation for the first time. Here's what I did.
>
> - created the directory com/ociweb below my current directory
> - created the source file math.clj with the following content
>
> (ns com.ociweb.math)
> (defn fib [n] (reduce * (range 2 (inc n))))
>
> - started a REPL in the current directory
> - entered (load "com/ociweb/math")
> - entered (com.ociweb.math/fib 5) to verify that it works
> - tried to compile it with (compile 'com.ociweb.math), but got
>   java.lang.RuntimeException: java.lang.ClassNotFoundException:
> com.ociweb.math$fib__193 (NO_SOURCE_FILE:0)
>
> I have . in my classpath. Any idea what I'm doing wrong?
>   


Your classpath does not contain the folder to the .clj file.

See this example, with detailed explanations on classpath for compiling 
and then running gen-class generated classes:

http://pacific.mpi-cbg.de/wiki/index.php/Clojure_Scripting#Generating_java_classes_in_.class_files_from_clojure_code


Albert

-- 
Albert Cardona
http://albert.rierol.net


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