2017-03-04 8:13 GMT+01:00 Jeaye <cont...@jeaye.com>:

> On Sat, Mar 04, 2017 at 08:09:39AM +0100, Cecil Westerhof wrote:
> > 2017-03-04 7:44 GMT+01:00 Jeaye <cont...@jeaye.com>:
> >
> > > 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}`.
>

​That is why it is smart to communicate small non essential changes: people
can set you on the right track. :-)

I put that back. I now removed the ‘:aot [quotes.core]’, or should I keep
that also?

When I first got the error I found two different pieces of advice. One for
both changes. When those did not work I asked here.


I should pick up Clojure again. I only did one little project (long ago) to
try it out. But that is no way to learn a language. Sadly there is no real
use here for it. :'-(

-- 
Cecil Westerhof

-- 
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/d/optout.

Reply via email to