JDK中src.zip文件的正确位置是什么?

huangapple go评论62阅读模式
英文:

What is correct location of src.zip file in JDK?

问题

src.zip在JDK中的正确位置应该是什么?

应该是JAVA_HOME/lib/src.zip吗?

还是

应该是JAVA_HOME/src.zip

哪一个是正确的?

JDK版本 - openjdk11

英文:

What should be the correct location of src.zip in JDK?

Should it be JAVA_HOME/lib/src.zip?

or

Should it be JAVA_HOME/src.zip?

Which one is correct?

JDK version - openjdk11

答案1

得分: 2

根据您使用的Java版本不同,

  • 在Java 9及以上版本中,应该是$JAVA_HOME/lib/src.zip<sup>1</sup>
  • 在Java 8及之前的版本中,应该是$JAVA_HOME/src.zip

<sup>1</sup><sub>另请参阅Project Jigsaw。更详细地说,参阅JEP 201JEP 220。</sub>

英文:

It depends on the version of Java you are using, with

  • Java 9+ it should be $JAVA_HOME/lib/src.zip<sup>1</sup>
  • Java 8 and earlier it should be $JAVA_HOME/src.zip

<sup>1</sup><sub>See also Project Jigsaw. More specifically, JEP 201 and JEP 220.</sub>

答案2

得分: 0

大部分情况下,JDK源代码被命名为src.zip,位于安装路径的根文件夹中。
在你提到的Java 11中,它位于$JAVA_HOME/lib/src.zip,在其他版本中可能会有所不同。在问题中注明你当前使用的Java版本将有助于找到更好的答案

英文:

mostly, the JDK source code is named src. zip , and located at the root folder of the JDK installed path.
in your question Java 11, it is $JAVA_HOME/lib/src.zip and it will be different in other versions. stating the Java version that you are currently using in the question will help you to find a better answer

huangapple
  • 本文由 发表于 2020年4月9日 12:58:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/61114268.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定