Hello all, I needed to import a class (that I didn't write) today into Clojure. The problem is that the class has no explicit package declaration.
The solution that I found out (thanks to Chouser on #clojure) is this: (.importClass *ns* 'Foo (clojure.lang.RT/classForName "Foo")) This tip might be useful for others. On the other hand, would it make sense to augment 'import' to allow for this case? Perhaps something like (import '(nil Foo)) Duncan. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---