Java EE / J2EE 与 J2SE / JDK 版本之间的相关性

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2013958/
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-13 02:33:01  来源:igfitidea点击:

Correlation between Java EE / J2EE to J2SE / JDK versions

jakarta-eejava

提问by Eran Medan

I was certain that I'll find a duplicate question or a satisfying answer, but I haven't.

我确信我会找到重复的问题或令人满意的答案,但我没有。

What I'm looking for is the answer to these questions:

我正在寻找的是这些问题的答案:

  • Is there an official correlation between Java EE / J2EE and J2SE / JDK versions?
  • If the answer is yes, where is it written?
  • If the answer is no, then why? and is there an unofficial version table (e.g. JDK 1.4 goes well with J2EE 1.3, JDK 1.5 goes well with J2EE 1.4, JDK 1.6 with Java EE 5 and so on)
  • Java EE / J2EE 和 J2SE / JDK 版本之间是否有官方关联?
  • 如果答案是肯定的,它写在哪里?
  • 如果答案是否定的,那为什么?是否有非官方的版本表(例如 JDK 1.4 与 J2EE 1.3 兼容,JDK 1.5 与 J2EE 1.4 兼容,JDK 1.6 与 Java EE 5 等等)

I can think of a couple of reasons for the uncoupling, but can't seem to find a good reference source

我能想到解耦的几个原因,但似乎找不到好的参考来源

Related questions:

相关问题:

Java SE vs Java EE, college and career

Java SE 与 Java EE,大学和职业

What is Java EE?

什么是 Java EE?

采纳答案by Pascal Thivent

Is there an official correlation between Java EE / J2EE and J2SE / JDK versions?

Java EE / J2EE 和 J2SE / JDK 版本之间是否有官方关联?

Sun may try to keep some kind of "correlation" to not confuse users and for marketing purpose but, AFAIK, no, there is no official correlation (and maintaining the pseudo synchronisation might become harder in the future as the JDK evolves faster than the Java EE specification).

Sun 可能会尝试保持某种“相关性”,以免混淆用户并用于营销目的,但是,AFAIK,,没有官方相关性(并且随着 JDK 的发展速度比 Java 快,未来维护伪同步可能会变得更加困难) EE 规范)。

UPDATE:I was wrong, there is actually a correlation (see below). But I still think that this might become a problem: Java 7 is scheduled for late 2010, will the expert group succeed to roll out Java EE 7 before Java 8 and Java 7 EOL?

更新:我错了,实际上存在相关性(见下文)。但我仍然认为这可能会成为一个问题:Java 7 定于 2010 年末,专家组能否在 Java 8 和 Java 7 EOL 之前成功推出 Java EE 7?

If the answer is yes, where is it written?

如果答案是肯定的,它写在哪里?

Quoting the JSR 151: JavaTM 2 Platform, Enterprise Edition 1.4 (J2EE 1.4) Specificationhome page:

引用JSR 151:JavaTM 2 Platform, Enterprise Edition 1.4 (J2EE 1.4) 规范主页:

  • J2EE 1.4 is the Enterprise Edition of version 1.4 of the Java platform, and thus will be built on J2SE 1.4.
  • J2EE 1.4 是 Java 平台 1.4 版的企业版,因此​​将构建在 J2SE 1.4 之上。

Quoting the JSR 244: Java(TM) Platform, Enterprise Edition 5 (Java EE 5) Specificationhome page:

引用JSR 244:Java(TM) 平台,企业版 5 (Java EE 5) 规范主页:

  • Java EE 5 is the Enterprise Edition of version 5 of the Java platform, and thus will be built on J2SE 5.0.
  • Java EE 5 是 Java 平台第 5 版的企业版,因此​​将基于 J2SE 5.0 构建。

Quoting the JSR 316: JavaTM Platform, Enterprise Edition 6 (Java EE 6) Specificationhome page:

引用JSR 316: JavaTM Platform, Enterprise Edition 6 (Java EE 6) 规范主页:

  • Java EE 6 is the Enterprise Edition of version 6 of the Java platform, and thus will be built on Java SE 6.
  • Java EE 6 是 Java 平台第 6 版的企业版,因此​​将基于 Java SE 6 构建。

Seriously, why do we have to go to the JCP website to find this (maybe I should have started there though)?

说真的,为什么我们必须去 JCP 网站才能找到这个(也许我应该从那里开始)?

If the answer is no, then why?

如果答案是否定的,那为什么?

Java Enterprise Edition is a specification, not an implementation. It might rely on specific features (like Java EE 5 and Java 5 generics) but the JDK version is actually dependent upon the implementation of the container you are using.See the Websphere example below. (This still applies, even after the big UPDATEabove.)

Java Enterprise Edition 是一种规范,而不是一种实现。它可能依赖于特定功能(如 Java EE 5 和 Java 5 泛型),但JDK 版本实际上取决于您使用的容器的实现。请参阅下面的 Websphere 示例。(即使在上面的大更新之后,这仍然适用。)

and is there an unofficial version table (e.g. JDK 1.4 goes well with J2EE 1.3, JDK 1.5 goes well with J2EE 1.4, JDK 1.6 with Java EE 5 and so on)

是否有非官方的版本表(例如 JDK 1.4 与 J2EE 1.3 兼容,JDK 1.5 与 J2EE 1.4 兼容,JDK 1.6 与 Java EE 5 等等)

As I said above, "goes well" doesn't really makes sense as this depends on the container you are using and containers might have different compatibility requirements (for example IBM WebSphere's J2EE 1.4 server may not work with JDK 5). So, I'd rather speak in terms of requirements.

正如我上面所说,“顺利”并没有真正意义,因为这取决于您使用的容器,并且容器可能具有不同的兼容性要求(例如,IBM WebSphere 的 J2EE 1.4 服务器可能无法与 JDK 5 一起使用)。所以,我宁愿从需求的角度说话。

The J2EE 1.4 SDK is bundled with JDK 5 but... J2EE 1.4 requires JDK 1.4 or later. Java EE 5 requires JDK 5 or later. Java EE 6 requires JDK 6 or later (JDK 5 is at its EOL for 2+ months now).

J2EE 1.4 SDK 与 JDK 5 捆绑在一起,但是... J2EE 1.4 需要 JDK 1.4 或更高版本。Java EE 5 需要 JDK 5 或更高版本。Java EE 6 需要 JDK 6 或更高版本(JDK 5 现在已停产 2 个多月)。

回答by Jonathan Feinberg

Java EE is a set of specifications and a reference implementation for those specs. A given version may happen to depend on language features present in some version of the JDK, or it may not.

Java EE 是一组规范和这些规范的参考实现。给定的版本可能恰好依赖于某些 JDK 版本中存在的语言特性,也可能不依赖。

You can think of Java EE the same way you think of any third-party framework or library for Java. There's no reason for the version numbers of Java EE and the JDK to have anything at all to do with each other.

您可以像看待 Java 的任何第三方框架或库一样看待 Java EE。Java EE 和 JDK 的版本号完全没有任何关系。

回答by Powerlord

Generally, Java Enterprise Editions come out after the JDK for the same versions.

通常,Java 企业版在相同版本的 JDK 之后出现。

Basically, for the past few editions, you've had these download packages:
JDK 5 with J2EE 4.
JDK 5 with Java EE 5.
JDK 6 with Java EE 5.
JDK 6 with Java EE 6 (currently only available from the Java EE page, the Java SE page still has JDK 6 with Java EE 5)

基本上,对于过去的几个版本,您已经拥有以下下载包:
带有 J2EE 4 的
JDK 5。带有 Java EE 5 的
JDK 5。带有 Java EE 5 的
JDK 6。带有 Java EE 6 的 JDK 6(目前只能从 Java EE 中获得)页面,Java SE 页面仍然有带有 Java EE 5 的 JDK 6)

Note that these download packages actually include Sun's version of Java EE (Glassfish these days), which is different than Apache's version of Java EE (Tomcat/Geronimo) or IBM's version of Java EE (Websphere).

请注意,这些下载包实际上包括 Sun 的 Java EE 版本(现在的 Glassfish),这与 Apache 的 Java EE 版本(Tomcat/Geronimo)或 IBM 的 Java EE(Websphere)版本不同。

If you choose not to use Glassfish, you can download just JDK6 and one of the other Java EE packages. As of right now, Glassfish is the only Java EE 6 product, as Java EE 6 just came out and it's the reference implementation.

如果您选择不使用 Glassfish,您可以只下载 JDK6 和其他 Java EE 包之一。到目前为止,Glassfish 是唯一的 Java EE 6 产品,因为 Java EE 6 刚刚问世,它是参考实现。