Thanks. I should probably clarify.

I have managed to compile the classes using (add-classpath ""). My
problem is using the compiled classes. The example code is here:
http://clojure.org/compilation

Namely...

(ns clojure.examples.hello
    (:gen-class))

(defn -main
  [greetee]
  (println (str "Hello " greetee "!")))

and, ...

(compile 'clojure.examples.hello)

and, ...

java -cp ./classes:clojure.jar clojure.examples.hello Fred

Calling the main method from the clojure.org doc results in the
previously mentioned exception (or package/namespace specific
exception) when using clojure v1.0

I have called the main method from the command line. I have called it
from Java classes. I have called it with the doc's namespace and mine.
It all results in the same exception. My Java classes recognize the
-cp argument, and the AOT classes throw the file not found exception.

Like I said, I must be missing something real simple. I just can't
figure out what it is.

Thanks again!



On Tue, Sep 1, 2009 at 6:46 AM, Meikel Brandmeyer<m...@kotka.de> wrote:
>
> Hi,
>
> On Sep 1, 6:58 am, Terrance Davis <terrance.da...@gmail.com> wrote:
>
>> It seems like every path I set from "java -cp" is ignored from inside
>> of REPL, main or calling AOT classes. In fact, when I start Clojure
>> from a directory, I  have to explicitly (add-classpath
>> "file:///some/path/") from REPL to compile clj files in the same
>> directory that I started Clojure from (or any other directory).
>
> For AOT compilation the source files must be reachable as well as the
> generated .class files. So if you sources are in the src subdirectory
> and the .class files go to the classes subdirectory, you'll need both
> subdirectories in the classpath. (Note: with "reachable" I mean
> "follow the usual convention", namespace foo.bar.baz must be in src/
> foo/bar/baz.clj with src in the classpath)
>
> Adding "." to the classpath should take care of the current working
> directory.
>
> Maybe you can post an example, how you setup your classpath for the
> JVM and the exact steps to reproduce the error? That makes it easier
> to help.
>
> Sincerely
> Meikel
>
> >
>

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