简体   繁体   中英

Leiningen tries to call java.exe from a wrong/missing JDK

Some time ago, there were two versions of JDK installed on my PC (1.7.0_09 and 1.7.0_51). Then I uninstalled the former one. Now, when I try to run lein run (even with a dummy project) I get the following message:

java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.7.0_09\bin\java.exe" (in directory "<...>"): CreateProcess error=2, The system cannot find the file specified

What can I do to make lein use the right JDK? The JAVA_HOME and JDK_HOME variables are not set.

Check the following settings:

  • Does java -version show the right version ?
  • Does a system variable JAVA_HOME , JDK_HOME , JAVA_CMD or LEIN_JAVA_CMD point to the wrong JDK ?
  • Does your leiningen project profile have a :java-cmd setting forcing a specific JVM ?
  • Does your leiningen user profile ~/.lein/profiles.clj have a :java-cmd setting ?
  • When using an IDE with built-in leiningen, is your IDE project JDK the right one ?
  • Were changes made to lein.sh / lein.bat ?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM