简体   繁体   English

Java Home 未设置

[英]Java Home not set

I downloaded gradle and in the instruction it told me to add it to system variables so i did but i accidentally removed one of the paths.我下载了 gradle 并在说明中告诉我将其添加到系统变量中,所以我这样做了,但我不小心删除了其中一个路径。 So when i tried to see what version of gradle i use it was saying error java home is not set(you can see in the image in the mingv terminal).所以当我试图查看我使用的 gradle 版本时,它说错误 java home is not set(你可以在 mingv 终端的图像中看到)。 My question is how can i set up my java home here is an image where is showing the paths that i have and on the right what its saying on terminal.我的问题是如何设置我的 java 主页,这是一张图像,其中显示了我拥有的路径,右侧显示了终端上的内容。

Your screenshot presents list of PATH variable values.您的屏幕截图显示了PATH变量值的列表。 Close this dialog.关闭此对话框。

On the parent dialog window, add new variable, name it JAVA_HOME .在父对话框窗口中,添加新变量,将其命名为JAVA_HOME

Put the following value to it: C:\Program Files\jdk-18.0.1将以下值放入其中: C:\Program Files\jdk-18.0.1

Click OK to accept your changes单击“确定”接受您的更改

截屏

Click on 'new'.点击“新建”。 Type "JAVA_HOME" inside variable name and type path for the java bin folder on variable value.在变量名称中键入“JAVA_HOME”,并在变量值上键入 java bin 文件夹的路径。

The result will be as below结果如下

System variables系统变量

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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