Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program wi

win10安装java(jdk或jre) 环境报错: Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program wil

    • 一,下包安装java
    • 二,解决报错
    • 大功告成

环境报错:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program wil

一,下包安装java

在官网下载jdk包
官网地址
直接下载 .exe结尾的安装,下一步下一步全部默认选着
安装-结束。
运行windows+r输入cmd
执行java --version
Error: Could not create the Java Virtual Machine
Error: A fatal exception has occurred. Program wil

二,解决报错

1,右键我的电脑****–属性高级系统设置–环境变量
Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program wi_第1张图片

Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program wi_第2张图片2,在“用户变量” “新建”,输入变量名:JAVA_HOME
和变量值:C:\Program Files\Java\jdk-11.0.8 (自己JDK的安装路径)

Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program wi_第3张图片

3,在“用户变量中” 找到**“Path”变量,“编辑”。**

Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program wi_第4张图片,4,点击新建,新建两个变量,然后确定。
变量值:
%JAVA_HOME%\bin
%JAVA_HOME%\jre\bin

Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program wi_第5张图片

5,键盘 “windows+r”运行,输入cmd

Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program wi_第6张图片
执行 java --version

Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program wi_第7张图片
然后就完成java环境的安装了。

大功告成

你可能感兴趣的:(windows,Kubernetes,jdk,java,windows)