Java SE 6 vs. JRE 1.6 vs. JDK 1.6 - 这些是什么意思?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/250517/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 12:00:57  来源:igfitidea点击:

Java SE 6 vs. JRE 1.6 vs. JDK 1.6 - What do these mean?

java

提问by Joe Schneider

I see many different Java terms floating around. I need to install the JDK 1.6. It was my understanding that Java 6 == Java 1.6. However, when I install Java SE 6, I get a JVM that reports as version 11.0! Who can solve the madness?

我看到许多不同的 Java 术语四处流传。我需要安装 JDK 1.6。我的理解是 Java 6 == Java 1.6。但是,当我安装 Java SE 6 时,我得到一个报告为 11.0 版的 JVM!谁能解决疯子?

采纳答案by Paul Tomblin

When you type "java -version", you see three version numbers - the java version (on mine, that's "1.6.0_07"), the Java SE Runtime Environment version ("build 1.6.0_07-b06"), and the HotSpot version (on mine, that's "build 10.0-b23, mixed mode"). I suspect the "11.0" you are seeing is the HotSpot version.

当您键入“java -version”时,您会看到三个版本号 - Java 版本(我的版本是“ 1.6.0_07”)、Java SE 运行时环境版本(“build 1.6.0_07-b06”)和 HotSpot 版本(我的版本是“” build 10.0-b23, mixed mode") . 我怀疑你看到的“11.0”是HotSpot版本。

Update: HotSpot is (or used to be, now they seem to use it to mean the whole VM) the just-in-time compiler that is built in to the Java Virtual Machine. God only knows why Sun gives it a separate version number.

更新:HotSpot 是(或曾经是,现在他们似乎用它来表示整个 VM)是 Java 虚拟机内置的即时编译器。天知道为什么 Sun 给它一个单独的版本号。

回答by Jonathan Leffler

  • JDK - Java Development Kit
  • JRE - Java Runtime Environment
  • Java SE - Java Standard Edition
  • JDK - Java 开发工具包
  • JRE - Java 运行时环境
  • Java SE - Java 标准版

SE defines a set of capabilities and functionalities; there are more complex editions (Enterprise Edition – EE) and simpler ones (Micro Edition – ME – for mobile environments).

SE 定义了一组能力和功能;有更复杂的版本(企业版 - EE)和更简单的版本(微型版 - ME - 用于移动环境)。

The JDK includes the compiler and other tools needed to develop Java applications; JRE does not. So, to run a Java application someone else provides, you need JRE; to develop a Java application, you need JDK.

JDK 包括开发 Java 应用程序所需的编译器和其他工具;JRE 没有。因此,要运行其他人提供的 Java 应用程序,您需要 JRE;要开发 Java 应用程序,您需要 JDK。

Edited: As Chris Marasti-Georg pointed out in a comment, you can find out lots of information at Sun's Javaweb site, and in particular from the Java SEsection, (2nd option, Java SE Development Kit (JDK) 6 Update 10).

编辑:正如 Chris Marasti-Georg 在评论中指出的那样,您可以在 Sun 的Java网站上找到很多信息,特别是从Java SE部分,(第二个选项,Java SE 开发工具包 (JDK) 6 Update 10) .



Edited 2011-04-06:The world turns, and Java is now managed by Oracle, which bought Sun. Later this year, the sun.comdomain is supposed to go dark. The new page (based on a redirect) is this Javapage at the Oracle Tech Network. (See also java.com.)

2011-04-06 编辑:世界轮回,Java 现在由 Oracle 管理,Oracle 收购了 Sun。今年晚些时候,这个sun.com领域应该会变暗。新页面(基于重定向)是Oracle Tech Network上的这个Java页面。(另见java.com。)



Edited 2013-01-11:And the world keeps on turning (2012-12-21 notwithstanding), and lo and behold, JRE 6 is about to reach its end of support. Oraclesays no more public updates to Java 6 after February 2013.

2013 年 1 月 11 日编辑:世界一直在转动(尽管是 2012 年 12 月 21 日),瞧,JRE 6 即将结束其支持。 Oracle表示在 2013 年 2 月之后不会再对 Java 6 进行公开更新。

Within a given version of Java, this answer remains valid. JDK is the Java Development Kit, JRE is the Java Runtime Environment, Java SE is the standard edition, and so on. But the version 6 (1.6) is becoming antiquated.

在给定的 Java 版本中,此答案仍然有效。JDK 是 Java Development Kit,JRE 是 Java Runtime Environment,Java SE 是标准版,等等。但是版本 6 (1.6) 已经过时了。

Edited 2015-04-29:And with another couple of revolutions around the sun, the time has come for the end of support for Java SE 7, too. In April 2015, Oracle affirmedthat it was no longer providing public updates to Java SE 7. The tentative end of public updates for Java SE 8 is March 2017, but that end date is subject to change (later, not earlier).

2015 年 4 月 29 日编辑:随着围绕太阳的又几次革命,对 Java SE 7 的支持也到了结束的时候了。2015 年 4 月,Oracle确认不再提供 Java SE 7 的公开更新。 Java SE 8 公开更新的暂定结束日期是 2017 年 3 月,但该结束日期可能会发生变化(更晚,而不是更早)。

回答by toolkit

With the release of Java 5, the product version was made distinct from the developer version as described here

随着 Java 5 的发布,产品版本与此处所述的开发人员版本不同

回答by Xonatron

This might help someone:

这可能会帮助某人:

I am installing the latest Java on my system for development, and currently it's Java SE 7. Now, let's dive into this "madness", as you put it...

我正在我的系统上安装最新的 Java 以进行开发,目前它是 Java SE 7。现在,让我们深入了解这个“疯狂”,正如你所说的......

All of these are the same (when developers are talking about Java for development):

所有这些都是相同的(当开发人员谈论用于开发的 Java 时):

  • Java SE 7
  • Java SE v1.7.0
  • Java SE Development Kit 7
  • Java SE 7
  • Java SE v1.7.0
  • Java SE 开发工具包 7

Starting with Java v1.5:

从 Java v1.5 开始:

  • v5 = v1.5.
  • v6 = v1.6.
  • v7 = v1.7.
  • v5 = v1.5。
  • v6 = v1.6。
  • v7 = v1.7。

And we can assume this will remain for future versions.

我们可以假设这将保留在未来的版本中。

Next, for developers, download JDK, not JRE.

接下来,对于开发者,下载JDK,而不是JRE。

JDK will contain JRE. If you need JDK and JRE, get JDK. Both will be installed from the single JDK install, as you will see below.

JDK 将包含 JRE。如果您需要 JDK 和 JRE,请获取 JDK。两者都将从单个 JDK 安装中安装,如下所示。

As someone above mentioned:

正如上面有人提到的:

  • JDK = Java Development Kit (developers need this, this is you if you code in Java)
  • JRE = Java Runtime Environment (users need this, this is every computer user today)
  • Java SE = Java Standard Edition
  • JDK = Java Development Kit(开发人员需要这个,如果你用Java编码,这就是你)
  • JRE = Java Runtime Environment(用户需要这个,这是今天的每个计算机用户)
  • Java SE = Java 标准版

Here's the step by step links I followed (one step leads to the next, this is all for a single download) to download Java for development (JDK):

这是我遵循的分步链接(一步指向下一步,这只是一次下载)以下载用于开发的 Java (JDK):

  1. Visit "Java SE Downloads": http://www.oracle.com/technetwork/java/javase/downloads/index.html
  2. Click "JDK Download" and visit "Java SE Development Kit 7 Downloads": http://www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html(note that following the link from step #1 will take you to a different link as JDK 1.7 updates, later versions, are now out)
  3. Accept agreement :)
  4. Click "Java SE Development Kit 7 (Windows x64)": http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-windows-x64.exe(for my 64-bit Windows 7 system)
  5. You are now downloading (hopefully the latest) JDK for your system! :)
  1. 访问“Java SE 下载”:http: //www.oracle.com/technetwork/java/javase/downloads/index.html
  2. 点击“JDK下载”,访问“Java SE Development Kit 7 Downloads”:http: //www.oracle.com/technetwork/java/javase/downloads/java-se-jdk-7-download-432154.html(注意按照步骤 #1 中的链接将带您到另一个链接,因为 JDK 1.7 更新(更高版本)现已发布)
  3. 接受协议:)
  4. 单击“Java SE Development Kit 7 (Windows x64)”:http: //download.oracle.com/otn-pub/java/jdk/7/jdk-7-windows-x64.exe(对于我的 64 位 Windows 7系统)
  5. 您现在正在为您的系统下载(希望是最新的)JDK!:)

Keep in mind the above links are for reference purposes only, to show you the step by step method of what it takes to download the JDK.

请记住,以上链接仅供参考,向您展示下载 JDK 所需的分步方法。

And install with default settings to:

并使用默认设置安装到:

  • “C:\Program Files\Java\jdk1.7.0\” (JDK)
  • “C:\Program Files\Java\jre7\” (JRE) <--- why did it ask a new install folder? it's JRE!
  • “C:\Program Files\Java\jdk1.7.0\”(JDK)
  • “C:\Program Files\Java\jre7\” (JRE) <--- 为什么要求一个新的安装文件夹?是JRE!

Remember from above that JDK contains JRE, which makes sense if you know what they both are. Again, see above.

请记住上面的 JDK 包含 JRE,如果您知道它们都是什么,这很有意义。再次,见上文。

After your install, double check “C:\Program Files\Java” to see both these folders. Now you know what they are and why they are there.

安装后,仔细检查“C:\Program Files\Java”以查看这两个文件夹。现在您知道它们是什么以及它们为何存在。

I know I wrote this for newbies, but I enjoy knowing things in full detail, so I hope this helps.

我知道我是为新手写的,但我喜欢详细了解事物,所以我希望这会有所帮助。

回答by mario

Java SE Runtime is for end user, so you need Java JRE version, the first version of Java was the 1, then 1.1 - 1.2 - 1.3 - 1.4 - 1.5 - 1.6 etc and usually each version is named by version so JRE 6 means Java jre 1.6, anyway there is the update version, for example 1.6 update 45, which is named java jre 6u45.

Java SE Runtime 适用于最终用户,因此您需要 Java JRE 版本,Java 的第一个版本是 1,然后是 1.1 - 1.2 - 1.3 - 1.4 - 1.5 - 1.6 等,通常每个版本都按版本命名,因此 JRE 6 表示 Java jre 1.6,反正有更新版本,比如1.6 update 45,就叫java jre 6u45。

From what I know, they preferred to use the number 6 instead using 1.6 to better reflect the level of maturity, stability, scalability, security and more

据我所知,他们更喜欢使用数字 6 而不是使用 1.6,以更好地反映成熟度、稳定性、可扩展性、安全性等水平

回答by Manav

A Brief and Maybe Incorrect History of Java Versions

Java 版本的简短且可能不正确的历史

  • Java is a platform. It consists of two products - the software development kit, and the runtime environment.

  • When Java was first released, it was apparently just called Java. If you were a developer, you also knew the version, which was a normal "1.0" and later a "1.1". The two products that were part of the platform were also given names:

    • JDK - "Java Development Kit"
    • JRE - "Java Runtime Environment"
  • Apparently the changes in version 1.2 so significant that they started calling the platform as Java 2.

    • The default "distribution" of the platform was given the moniker "standard" to contrast it with its siblings. So you had three platforms:

      • "Java 2 Standard Edition (J2SE)"
      • "Java 2 Enterprise Edition (J2EE)"
      • "Java 2 Mobile Edition (J2ME)"
    • The JDK was officially renamed to "Java 2 Software Development Kit".

  • When version 1.5 came out, the suits decided that they needed to "rebrand" the product. So the Java platform got two versions - the product version "5" and the developer version "1.5" (Yes, the rule is explicitly mentioned -- "drop the '1.'). However, the "2" was retained in the name. So now the platform is officially called "Java 2 Platform Standard Edition 5.0 (J2SE 5.0)".

    • The suits also realized that the development community was not picking up their renaming of the JDK. But instead of reverting their change, they just decide to drop the "2" from the name of the individual products, which now get be "J2SE Development Kit 5.0 (JDK 5.0)"and "J2SE Runtime Environment 5.0 (JRE 5.0)".
  • When version 1.6 come out, someone realized that having two numbers in the name was weird. So they decide to completely drop the 2 (and the ".0" suffix), and we end up with the "Java Platform, Standard Edition 6 (Java SE 6)"containing the "Java SE Development Kit 6 (JDK 6)"and the "Java SE Runtime Environment 6 (JRE 6)".

  • Version 1.7 did not do anything stupid. If I had to guess, the next big change would be dropping the "SE", so that the cycle completes and the JDK again gets to be called the "Java Development Kit".

  • Java是一个平台。它由两个产品组成——软件开发工具包和运行时环境。

  • 当 Java 首次发布时,它显然只是被称为Java。如果您是开发人员,您也知道版本是正常的“1.0”,后来是“1.1”。作为平台一部分的两种产品也被命名为:

    • JDK - “Java 开发工具包”
    • JRE - “Java 运行时环境”
  • 显然 1.2 版中的变化如此重要,以至于他们开始将该平台称为Java 2

    • 该平台的默认“分布”被赋予了绰号“标准”,以与其兄弟姐妹进行对比。所以你有三个平台:

      • “Java 2 标准版(J2SE)”
      • “Java 2 企业版 (J2EE)”
      • “Java 2 移动版 (J2ME)”
    • JDK 正式更名为“Java 2 软件开发工具包”。

  • 当 1.5 版发布时,诉讼决定他们需要“重新命名”产品。所以Java平台有两个版本——产品版本“5”和开发者版本“1.5”(是的,规则明确提到——“去掉'1。')。然而,“2”被保留在名称。所以现在该平台的正式名称为“Java 2 Platform Standard Edition 5.0 (J2SE 5.0)”

    • 诉讼还意识到开发社区并没有接受他们对 JDK 的重命名。但是他们并没有恢复更改,而是决定从各个产品的名称中删除“2”,现在它们是“J2SE Development Kit 5.0 (JDK 5.0)”“J2SE Runtime Environment 5.0 (JRE 5.0)”
  • 当版本 1.6 出来时,有人意识到名称中有两个数字很奇怪。所以他们决定完全放弃 2(和“.0”后缀),我们最终得到包含“Java SE Development Kit 6 (JDK 6)”“Java Platform, Standard Edition 6 (Java SE 6)”“Java SE 运行时环境 6 (JRE 6)”

  • 1.7 版没有做任何愚蠢的事情。如果我不得不猜测,下一个重大变化将是删除“SE”,以便循环完成并且 JDK 再次被称为“Java 开发工具包”。

Notes

笔记

  • For simplicity, a bunch of trademark signs were omitted. So assume Java?, JDK? and JRE?.

  • SO seems to have trouble rendering nested lists.

  • 为简单起见,省略了一堆商标标志。那么假设Java?,JDK?和JRE?。

  • SO 似乎在呈现嵌套列表时遇到问题。

References

参考

Epilogue

结语

Just drop the "1." from versions printed by javac -versionand java -versionand you're good to go.

只需删除“1”。从javac -versionand打印的版本开始java -version,你很高兴。