I'm trying to install Leiningen in order to install Overtone.
Following the directions for installing Leiningen, I:
Installed JDK7u25 Installed leiningen 2.2.0
Can't get any further because:
When I run lein.bat, I get this message: "Error: Could not find or load main class'
and -that's the end of the error message.
This happens when the computer runs the following batch file command:
"%LEIN_JAVA_CMD%" -client %LEIN_JVM_OPTS% ^
-Dclojure.compile.path="%DIR_CONTAINING%/target/classes" ^
-Dleiningen.original.pwd="%ORIGINAL_PWD%" ^
-cp %CLASSPATH% clojure.main -m leiningen.core.main %*
I've checked the environment variable for the location of java.exe
and the path for leiningen\bin
and they are both correct.
Both the Java installation and leinginen installation look fine: everything seems to be there and be in the right places.
When I rem out the @echo
off in the batch file, the console output shows that the paths used for both java.exe
and leiningen-2.2.0-standalone.jar
are correct. The only odd thing to a windows user is the -Dclojure.compile.path
, which is "E:\Documents and settings\<myname>\.lein/target/classes"
-- the 2 forward slashes "/" cannot be part of any windows path, but maybe they may make sense to java.
I'm new to all this stuff. Is there something missing from the instructions that's so obvious it wasn't included? Or is the problem just with me or my system.
Thanks for any help or ideas.
You need to fix the lein.bat file.
Line 27: Put quotes around the variable setting for LEIN_JAR, so:
if "x%LEIN_JAR%" == "x" set LEIN_JAR="!LEIN_HOME!\self-installs\leiningen-!LEIN_VERSION!-standalone.jar"
That should get lein running, it still throws up an error "no such command and" but I expect that is the same issue later in the .bat file. Lein still runs however.
Leningen 2.2.0
I am working on windows XP.(ONLY FOR WINDOWS XP)
I tried all the suggestion above, but it didn't work.
Error: Could not find or load main class
The problem is with spaces in path. I found a different workaround
Use lein repl to start
A simple workaround is to move the .lein folder to C:\lein and set environment variables properly
move "%userprofile%\.lein" c:\lein
set LEIN_HOME=C:\lein
set PATH=%PATH%;C:\lein\bin
then you can run
$lein repl
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With