Thanks for that solution. Ran into the same problem as well, and right
now I don't want to solve it, but just finish something else.

On Dec 13 2008, 11:21 pm, Eric Sessoms <nubga...@gmail.com> wrote:
> Did you ever get this resolved?  I just had the same thing start
> happening to me today, after not experiencing any problems with it as
> recently as yesterday.  (What changed?  I tried to install swank.
> Nuking swank did not fix the problem, tho.) Step by step:
>
> (add-classpath ...) ; seems to work, because
> (seq (.getURLs (clojure.lang.RT/baseLoader))) ; shows the added jar or
> directory, and
> (Class/forName ...) ; returns a result (no exception), but
>
> (import...) ; fails with ClassNotFoundException and
> (ns (:import...)) ; also fails
>
> I eventually got my code working again by copying the source of 
> theimportfunction out of core.clj, renaming it "my-import", and changing
> all myimportstatements to "my-import" statements, accordingly.
>
> Anyway, it makes no sense to me.  I'm just hoping someone more
> experienced will be able to say what's really going on.
>
> On Dec 9, 7:07 am, "rob.blackwell" <rob.blackw...@aws.net> wrote:
>
> > When I load a JAR at runtime with add-classpath
>
> > (add-classpath "file:///Users/reb/java/jena.jar")
>
> > and try
>
> > user=> (import'(com.hp.hpl.jena.rdf.model ModelFactory))
>
> > I get
>
> > java.lang.ClassNotFoundException:
> > com.hp.hpl.jena.rdf.model.ModelFactory (NO_SOURCE_FILE:0)
> > user=>
>
> > However, I can still use the classes if I fully qualify them.
>
> > The sameimportdoes work if I add the JAR to the classpath when
> > invoking java, but that seems to be less flexible.
>
> > Am I doing something wrong?
>
> > Is this a bug?
>
> > Any advice gratefully received!
--~--~---------~--~----~------------~-------~--~----~
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