I'm trying to install Leiningen from here https://djpowell.github.io/leiningen-win-installer/. But it cannot find SDK. If I check "Custom path" then it gives an out of range error on the next screen. Both Java and SDK are installed.
-
What's the error? And do you have Java on the system PATH? – Carcigenicate May 28 '18 at 10:55
-
Error: "An installed Java Developlent Kit could not be found automatically." – zeynel May 28 '18 at 10:59
-
İf I continue, it asks "Select the path to a Java Development Kit for Leiningen to use." If I check "Custom Location" on the next screen, I get "Runtime Error (at28:618) Out of range." – zeynel May 28 '18 at 11:02
-
How do I find if it is on the system path? – zeynel May 28 '18 at 11:03
-
https://www.java.com/en/download/help/path.xml – Carcigenicate May 28 '18 at 11:05
-
I have this: C:\Program Files (x86)\Common Files\Oracle\Java\javapath – zeynel May 28 '18 at 11:13
-
That looks wrong. See here: https://stackoverflow.com/questions/1672281/environment-variables-for-java-installation – Carcigenicate May 28 '18 at 11:15
-
Or just run a Java installer. Usually it handles all that. – Carcigenicate May 28 '18 at 11:16
-
I ran a Java installer – zeynel May 28 '18 at 11:27
1 Answers
that installer automates these steps (from the project page)
The installer makes curl.exe available so that leiningen can download and upgrade files.
The installer downloads and installs the latest lein.bat from github.
lein.bat is added to your PATH variable.
LEIN_JAVA_CMD is set to point to your selected JDK, and the :java-cmd property is set in your user profile in profiles.clj.
lein self-install is run to install the Leiningen JAR file.
The uninstaller will remove the files that were installed, together with the Leiningen self-installs and search indexes; the environment variables that were set, and the additions to the PATH.
A likely area for this to do wrong is the setting of LEIN_JAVA_CMD
and the :java-cmd
key in the leiningen profile.clj file.
I'd first check:
- the java path is correct in the value of the
LEIN_JAVA_CMD
environment vatiable - check the profiles.clj file in your home dirctory for conflicting JRE paths
- uninstall that installer and do it by following the instructions at https://leiningen.org/
also note that Clojure only required the java runtime JRE and does not require or use the JDK. differing versions and paths between these has caused problems as well.

- 1
- 1

- 90,827
- 27
- 201
- 284