📜  错误:未设置 JAVA_HOME 并且在您的 PATH 中找不到“java”命令 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:35.088000             🧑  作者: Mango

代码示例1
Windows 10:

Android Studio -> File -> Other Settings -> Default Project Structure... -> JDK location:

copy string shown, such as:
C:\Program Files\Android\Android Studio\jre

In file locator directory window, right-click on "This PC" ->

Properties -> Advanced System Settings -> Environment Variables... -> System Variables

click on the New... button under System Variables, then type and paste respectively:

.......Variable name: JAVA_HOME

.......Variable value: C:\Program Files\Android\Android Studio\jre

and hit OK buttons to close out.