Thanks the help is much appreciated
created file ocfLZWBW,java added package my.nice.lzw; to the top of the file changed /* */ public class OcfLZW to /* */ public class OcfLZWBW compiled ocfLZWBW.java to a class file of ocfLZWBW.class (no errors) in eclipse added the ocfLZWBW.class files in eclipse i see public class my.nice.lzw.ocfLZWBW when i use the class file editor added (let [oi (my.nice.lzw.OcfLZWBW.) buff buffout] ;; instantiate an object of that class (.expand oi buff buffout)) ;; call its expand() method fired up the repl get a compilerexception java.lang.ClassNotFoundException: my.nice.lzw.ocfLZWBW On Friday, March 28, 2014 12:15 PM, Tassilo Horn <t...@gnu.org> wrote: "bww00amd...@yahoo.com" <bww00amd...@yahoo.com> writes: > I have read so much i cant see the tree for the forest. and need some > help calling the ocfLZW class below from clojure. If that's really the complete class definition... > /* */ public class OcfLZW > /* */ { ... then you can't use it from Clojure because it's defined in the default package. There's no way to refer to such classes from any other package except from the default package itself (no matter if from Clojure or Java). Solution: Add a package my.nice.lzw; to the top of the java file. Then you can instantiate it and call its method's from Clojure like so: (let [oi (my.nice.lzw.OcfLZW.) ;; instantiate an object of that class s-inefficient ... out ...] (.expand oi s-inefficient out)) ;; call its expand() method HTH, Tassilo -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.