John, That appears to be working. Thanks!
-- Clinton On Tuesday, March 26, 2013 12:04:38 AM UTC-4, John Hume wrote: > > It looks like MimetypesFileTypeMap wants a path to a plain file. I can't > try this right now, but I think you want the constructor that takes an > InputStream. Something like > (MimetypesFileTypeMap. (io/input-stream (io/resource "thefile"))) > though if you just passed "/thefile" to io/input-stream, that might do it. > On Mar 25, 2013 9:08 PM, "Clinton Dreisbach" > <cli...@dreisbach.us<javascript:>> > wrote: > >> My apologies for a simple question, but: >> >> I have a very small library I wrote that needs to read a file in its >> resources/ directory. In the project, this works fine. However, when I >> package the library as a JAR, it can't find the file. I thought I was >> following the best practice of getting the file like so: >> >> (.getFile (io/resource "mime.types")) >> >> "mime.types" is definitely in the JAR; it's at the root. >> >> You can see the project at >> https://github.com/cndreisbach/ring.middleware.mime-extensions and the >> problem in particular at >> >> https://github.com/cndreisbach/ring.middleware.mime-extensions/blob/master/src/ring/middleware/mime_extensions.clj#L12 >> . >> >> Am I missing some piece of knowledge about my project.clj? Any help >> you could give would be very appreciated. >> >> Thanks, >> Clinton Dreisbach >> >> -- >> -- >> You received this message because you are subscribed to the Google >> Groups "Clojure" group. >> To post to this group, send email to clo...@googlegroups.com<javascript:> >> Note that posts from new members are moderated - please be patient with >> your first post. >> To unsubscribe from this group, send email to >> clojure+u...@googlegroups.com <javascript:> >> 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+u...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> -- -- 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/groups/opt_out.