Ah. I think there are issues with single-segment namespaces and AOT.
See comment on first answer here [1]. Maybe converting to depExp.core
would help.

Dave

[1] 
http://stackoverflow.com/questions/3390268/how-to-setup-the-classpath-when-running-the-jar-made-from-lein-uberjar

On Sat, Sep 17, 2011 at 10:57 AM, loonster <tbur...@acm.org> wrote:
> Nope.  The project.clj is:
>
> (defproject depExp "1.0.0-SNAPSHOT"
>  :description "FIXME: write"
>  :dependencies [[org.clojure/clojure "1.2.1"]
>                 [org.clojure/clojure-contrib "1.2.0"]]
>  :main depExp)
>
> Tim
>
> On Sep 17, 5:05 am, Dave Ray <dave...@gmail.com> wrote:
>> Did you forget to set the name of the main class/namespace in project.clj?
>> that would cause the behavior you're seeing.
>>
>> Dave
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Saturday, September 17, 2011, loonster <tbur...@acm.org> wrote:
>>
>> > On Sep 16, 1:24 am, Joost <jo...@zeekat.nl> wrote:
>> >> On Sep 16, 7:20 am, loonster <tbur...@acm.org> wrote:
>>
>> >> > Sound or image files will show up in the resulting uberjar if they
>> >> > reside in a /resources subdirectory of a Leiningen home project
>> >> > directory.  I can't find any documentation for how to refer to and
>> >> > load such resource files within a project.clj and/or a source clj file
>> >> > so that that the resources can be used by a standalone jar.   Many
>> >> > thanks for any hints.   Tim
>>
>> >> You can refer to resources using
>>
>> >> (clojure.java.io/input-stream (clojure.java.io/resource "path/to/
>> >> image"))
>>
>> >> See also ring.util.response/resource-response if you want to do this
>> >> in a war/jar web app.
>>
>> >> Joost.
>>
>> > Well, thanks all.  The most succinct code turned out to be
>> > (clojure.java.io/resource "fileName") and so my test fragment now
>> > consists of:
>>
>> > (ns depExp
>> >  (:gen-class))
>>
>> > (import '(java.applet Applet)
>> >        '(java.io File)
>> >        '(java.net URL))
>>
>> > (defn -main [& args]
>> >  (.play (Applet/newAudioClip (clojure.java.io/resource
>> > "looncall.au"))))
>>
>> > ;;;BTW, the "looncall.au" is a small sound file;;;
>>
>> > ...which works fine in the REPL and it also compiles but the resulting
>> > standalone jar file throws an error: "main"
>> > java.lang.NullPointerException.   Am using lein uberjar.   ???
>>
>> > --
>> > 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 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 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

Reply via email to