Fork me on GitHub
#improve-getting-started
<
2022-01-06
>
soxley02:01:26

This is in reference to https://clojurians.slack.com/archives/C053AK3F9/p1641434651007100. I suggest updating the documentation at https://clojure.org/guides/tools_build with some example code of the actual main class you’d be packaging up. The path I followed was about the first half of this guide: https://clojure.org/guides/deps_and_cli, which got me a running program. Then I wanted to package my program as a jar, which lead me to this guide: https://clojure.org/guides/tools_build. :gen-class is mentioned in the first guide, but it’s well past the point where you have a running program, and :gen-class isn’t mentioned at all in the second page, so that’s how I got stuck (I don’t think the documentation in the first guide would have helped me regardless). I’ve been doing clojure off and on for a while, so I suppose I should have known to use :gen-class, but I’ve never fully understood what it was for.

soxley04:01:35

Thank you! That issue perfectly sums up the problem and a good solution.