On Sat, Mar 04, 2017 at 08:09:39AM +0100, Cecil Westerhof wrote: > 2017-03-04 7:44 GMT+01:00 Jeaye <[email protected]>: > > > Cecil, > > > > > But when running: > > > lein uberjar > > > I still get: > > > This code is executed when starting Clojure. > > > Compiling quotes.core > > > Warning: The Main-Class specified does not exist within the jar. It may > > not > > > be executable as expected. A gen-class directive may be missing in the > > > namespace which contains the main method, or the namespace has not been > > > AOT-compiled. > > > Created /home/cecil/Clojure/Quotes/target/quotes-0.0.1.jar > > > Created /home/cecil/Clojure/Quotes/target/quotes-0.0.1-standalone.jar > > > > > > What do I need to change to make an uberjar. (Jars are generated, but > > > cannot be used.) > > > > The warning which lein provided is trying to tell you exactly what you > > need to do. In the `ns` form of your quotes.core namespace, you should add > > a (:gen-class). Example: > > > > ```clojure > > (ns quotes.core > > (:gen-class)) > > ``` > > > > That was what was needed. Thanks. > > And I could remove the added: > :profiles { > :uberjar {:aot :all} > }
For the best performance, you likely want AOT (ahead-of-time) compilation. In
general, I'd recommend keeping that uberjar profile with `{:aot :all}`.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: PGP signature
