Hi Gregg, Gregg Williams <greg...@innerpaths.net> writes:
> (ns genclassInteger > (:gen-class > :extends [java.lang.Integer]) > ;(:import (java.lang Integer)) ; <<<<< unnecessary, right? > ) > ----- > > This returns the error: > > Exception in thread "main" java.lang.ClassNotFoundException: > [java/lang/Integer] (genclassInteger.clj:1) I don't know why you're getting that particular exception but java.lang.Integer is a "final" class. [1] You therefore can't extend it. Also Java doesn't support multiple-inheritance of classes, so I don't think the class you pass to :extends should be wrapped in a vector. Finally, having a namespace without a "." in it means you're generating a class in the default package. Java doesn't like this at all and places some weird restrictions on classes in the default package. [2] This is may not be the cause of your problem but it's something I'd avoid anyway. So try something more like this: (ns myproject.myfoo (:gen-class :extends some.package.Foo)) Hope that helps, Alex [1] http://en.wikipedia.org/wiki/Final_(Java) [2] http://stackoverflow.com/questions/283816 -- 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