Question

I've tried to install Leiningen according to the official installation instructions. When running lein repl I get the following error message:

/usr/local/bin/lein: line 315: java: command not found

This leads me to believe that Leiningen requires a JDK/JRE to actually run but there is no mention of it in the docs. So, do I first need to install a JDK/JRE?

Was it helpful?

Solution

Yes, see installation instruction https://github.com/technomancy/leiningen#installation

OTHER TIPS

Yes, you need to install JDK first. Instruction for Windows installation is here

Leinengen comes packaged as a JAR file with a small bash script wrapping it, allowing for easy command line usage. This means that, like any other clojure or java program, it require the JVM to be run.

If you take a look at ~/.lein/self-installs/ you will see the JAR file(s) leiningen utilizes to run it's tasks.

One thing worthy of noting as well is that Leiningen starts its own JVM process before creating a new JVM process for your clojure program. They are not run in the same JVM container (to enforce isolation). Also, this initial Leiningen JVM process will not close until your clojure program has finished running as well (unless you utilize the trampoline).

As always, it's worth reading through the Leiningen docs at some point to better learn about what leiningen is truly doing. Hopefully that helps... happy coding!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top