本文介绍了JAVA_HOME设置为无效目录,但设置为正确的目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这里有很多.我知道.这些问题中的每一个最终都是有人用sys变量设置sys变量.;或者/bin
There is a lot of this here. I know that.Each one of these problems ends up being somebody setting the sys variable with a;or/bin
这是我的错误:
C:\Users\vakke\DarkBotDev3\DarkBotDev3>gradle build
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk_1.8.0_141
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
推荐答案
我会说您需要在该路径上加引号或转义该空间,因为它可能了解到该空间之前的部分是第一个参数,而rest是一个无效的参数,它正在忽略.您可以确认它正在了解空间吗?
I'd say you need quotes on that path or to escape that space, as it is probably understanding that the part before the space is the first parameter and the rest is an invalid parameter it is ignoring. Can you confirm it is understanding the space?
这篇关于JAVA_HOME设置为无效目录,但设置为正确的目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!