当我尝试使用console gradlew clean bootRun时,我看到了这一点:
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_101\bin\java;C:\Program Files\Java\jre1.8.0_101;C:\Program Files\Java\jdk1.8.0_101;C:\Users\ElteGps 022\Desktop\apache-tomcat-7.0.72\bin;C:\Program Files\Java\jdk1.8.0_101\bin
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
这是我的JAVA_HOME:
C:\Program Files\Java\jdk1.8.0_101\bin
答案 0 :(得分:1)
有效的JAVA_HOME汇编是:C:\ Program Files \ Java \ jdk1.8.0_101
不要添加" bin"文件夹,仅用于路径环境变量。