本文介绍了在Windows上安装Java 11 OpenJDK(系统路径问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Java 11最近已经发布,并且众所周知,该版本没有安装文件.

Java 11 had recently arrived and, as everybody knows, this version has no installation file.

要安装不带安装程序的Java,我已经将系统设置PATH和JAVA HOME设置为Java 11解压缩文件夹的地址(建议您接受类似问题的答复).

To install Java without installer I, of course, had set my system settings PATH and JAVA HOME to the address of the folder where my Java 11 was unzipped (advised by accepted reponses to similar questions).

唯一的是,所有关于系统设置的建议均无效 :

The only thing is that all those advices about system settings make no effect whatsoever on my machine:

  • 使用命令行检查会输出我的旧Java 9版本
  • 从文件夹中删除Java 9后,命令行根本无法识别任何Java.

那么,实际上有什么方法可以安装此版本?

So, is there actually any way to install this version?

感谢以后的回答,也没有将我的问题标记为重复(出于上述原因)

Thanks for future answers and for not marking my question as a duplicate (for the reason explained above)

推荐答案

问题在于路径行的格式:

The problem resided in the format of the path line:

  1. 我的路径中包含多个条目,我将Java放在行的末尾,并且更改不起作用

  1. My path included multiple entries, I was putting Java at the end of the line and the change was not working

但是当我将它放在路径行的开头时,Java 11被接受并开始在Windows上正常运行.

But when I placed it right at the start of the path line, Java 11 got accepted and started to function alright on my Windows.

对于其他面临类似问题的用户:问题的根源在于,正如Klitos Kyriacou正确指出的那样,我的路径包括名称中带有"java"字样的其他条目.在类路径中放在Java 11之前时,这些条目使我添加Java版本无效.

For other users facing a similar issue:The root of the problem was that, as Klitos Kyriacou rightly pointed out, my path included other entries that had a word 'java' in their names. When placed before Java 11 in the classpath, those entries were invalidating my adding of the java version.

这篇关于在Windows上安装Java 11 OpenJDK(系统路径问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-03 19:15