更新
查阅 JDK 11 Readme 知:JRE 直接于 JDK 中提供。
(In the bin/ subdirectory) An implementation of the Java Runtime Environment (JRE). The JRE includes a Java Virtual Machine (JVM™), class libraries, and other files that support the execution of programs written in the Java programming language. This directory also includes tools and utilities that will help you develop, execute, debug, and document programs written in the Java programming language. For further information, see the tools documentation at https://docs.oracle.com/javase/11/tools
遂下载 JDK 11,安装,删除旧版。
只不过这次又遇上了新的问题。(sigh)
javac
命令可以正常使用,但是当我使用java
时,产生如下错误信息:
Error: opening registry key 'Software\JavaSoft\JRE'
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
而当手动指定 executable 时则可以运行。
在安装新版与卸载旧版之后,我使用了 CCleaner 修复了注册表,并更改了环境变量。这种错误实在超出了我的能力范围。
巨硬德行如何人尽皆知,解决这个问题看来需要很大功夫呢。(笑)