Fork me on GitHub
#leiningen
<
2020-05-06
>
michaelb18:05:28

I have :profiles {:uberjar {:aot :all}}, which is what I want, but after compilation is finished I need javafx.application.Platform/exit to be called

michaelb18:05:40

not sure how I can accomplish that

byrongibby20:05:47

Hi. I am a little confused about how I should refer to resources in my project. Should it be (slurp "foo.txt") or (slurp "resources/foo.txt") ? I am thinking it it should be the former, but I get FileNotFoundException when running lein ring uberwar?

Alex Miller (Clojure team)20:05:18

neither - when loading from a file that ends up on the classpath, you should load it as a resource

👍 4
byrongibby20:05:57

Excuse my ignorance, but how do I do that?

Alex Miller (Clojure team)20:05:34

the path will be relative to whatever directory is included in the war, probably your resources/ directory

byrongibby20:05:09

I see, thank you very much for the help!

Alex Miller (Clojure team)20:05:11

this will work either from the file system (where the resource directory is on the classpath) or the uberwar (where the directory is inside the war)