Bill,

I switch between projects with slime using this method ->
http://github.com/dysinger/clojure-pom/tree/master which sets up slime
with _ALL_ the right jars / paths for each project using the
generated ./bin/XXXX repl script with SLIME.

-Tim

On Apr 12, 5:25 pm, billh04 <h...@tulane.edu> wrote:
> I can compile in NetBeans with enclojure and I can compile in AquaMacs
> with slime. However, I prefer to use AquaMacs without slime. But, I
> cannot compile my application using the (compile 'my.namespace.main)
> invocation. The classes are generated except for "main__init.class" (I
> believe).
>
> I can force it to comile correctly by using the following before I
> invoke (compile 'my.namespace.main) command:
>
> ========================
> (import 'java.io.File)
> (import 'java.net.URLClassLoader)
> (import 'java.net.URL)
> (import 'java.lang.ClassLoader)
>
> (defn classpath-add [path]
>   (let [url (cond (string? path) (.toURL (new java.io.File path))
>                   (instance? java.io.File path) (.toURL path)
>                   :else path)
>         addURL (.getDeclaredMethod (identity java.net.URLClassLoader)
>                                    "addURL"
>                                    (into-array [java.net.URL]))]
>     (.setAccessible addURL true) ; scared yet?
>     (.invoke addURL (ClassLoader/getSystemClassLoader) (to-array
> [url]))))
>
> (classpath-add "classes")
> ========================
>
> Thus, I believe the problem is due to "classes" not being in the
> classpath.
>
> I have looked around and I have seen recommendations to add the
> classpath for "classes" to my Aquamacs preference file, but I don't
> like that if I would be working on several projects in different
> directories.
>
> Is there an easy way for AquaMacs to pick up the directory for
> "classes" (which is in the same directory as my program "main.clj")
> when I invoke the "compile" command from Aquamacs?
>
> Thanks for any suggestions.
--~--~---------~--~----~------------~-------~--~----~
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