JDK = Java SE && JDK != Java EE?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2024143/
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
JDK = Java SE && JDK != Java EE?
提问by ajsie
Please confirm the above statement?
请确认以上说法?
I need to know what they are referring to when they mention JDK.
我需要知道他们提到 JDK 时指的是什么。
采纳答案by Ytsejammer
Java Development Kitis the way we usually refer to a set of tools to create Java applications, including the Java Compiler (to translate your JAVA Source classes into .class bytecode files), the Java Virtual Machine (to execute those .class files), the JAR tool to ZIP applications (or extract them) and so on.
Java Development Kit是我们通常引用的一组工具来创建 Java 应用程序的方式,包括 Java 编译器(将您的 JAVA 源类转换为 .class 字节码文件)、Java 虚拟机(执行那些 .class 文件)、 JAR 工具压缩应用程序(或提取它们)等等。
The Java Standard Editionusually refers to the core classes that make up the foundation of most Java programs, such as the Collections API (List, Map, Set, etc.), the classes in the java.lang package, the I/O classes, the Threading API, the RMI packages and classes, the i18n (internationalization) classes, the JDBC API and, of course, the AWT and Swing classes to create desktop applications and applets. These APIs are the very foundation of all other programs you can write 'in Java', such as the IntelliJ IDEA IDE, Servlet Containers (like Tomcat), RDBMS (like Apache Derby) or custom standalone clients such as SQuirreL. These classes you get as part of the JDK (just crack-open the src.zip file right under your JDK folder and see what you find there :) )
在Java标准版通常是指核心类构成了大部分的Java程序,比如集合API(列表,地图,集合等)的基础上,在java.lang包中的类,在I / O类、线程 API、RMI 包和类、i18n(国际化)类、JDBC API,当然还有用于创建桌面应用程序和小程序的 AWT 和 Swing 类。这些 API 是您可以“用 Java”编写的所有其他程序的基础,例如 IntelliJ IDEA IDE、Servlet 容器(例如 Tomcat)、RDBMS(例如 Apache Derby)或自定义独立客户端(例如 SQuirreL)。这些类是作为 JDK 的一部分获得的(只需打开 JDK 文件夹下的 src.zip 文件,看看您在那里找到了什么:))
Java EE is a specification with sub-specifications that, as a whole, define a set of services that implementations (such as GlassFish or IBM's WebSphere) should provide in order to be in compliance with the spec. These 'implementations' are the so-called Java EE Containers. When you hear people saying that 'GlassFish is a Java EE 1.6 implementation' they mean that GlassFish (a Java program written using the Java Standard Editionclasses) provides all the features that the Java EE 6 family of specifications define.
Java EE 是一个带有子规范的规范,作为一个整体,它定义了实现(例如 GlassFish 或 IBM 的 WebSphere)应该提供的一组服务,以便符合规范。这些“实现”就是所谓的 Java EE 容器。当您听到人们说“GlassFish 是 Java EE 1.6 实现”时,他们的意思是 GlassFish(使用Java 标准版类编写的 Java 程序)提供 Java EE 6 规范系列定义的所有功能。
The Java EE specifications are supposed to cover a particular need within the field of 'enterprise' application development, such as the Servlet specification for HTTP request-response processing, the EJB specification for transaction management and component life-cycle management, the JMS specification for messaging services and so on. The Java EE containers (WebLogic, WebSphere, Tomcat) provide actual implementations of these specifications as classes. In an overly simplified statement, these containers provide the JARs for the Java EE APIs. The classes within these JAR files make use of the Java SE core classes. I think this last sentence makes the connection between Java SE and Java EE.
Java EE 规范应该涵盖“企业”应用程序开发领域内的特定需求,例如用于 HTTP 请求-响应处理的 Servlet 规范、用于事务管理和组件生命周期管理的 EJB 规范、用于消息服务等。Java EE 容器(WebLogic、WebSphere、Tomcat)以类的形式提供这些规范的实际实现。简而言之,这些容器为 Java EE API 提供了 JAR。这些 JAR 文件中的类使用 Java SE 核心类。我认为这最后一句话建立了 Java SE 和 Java EE 之间的联系。
To wrap this up, I would say that the JDK is just a set of programs you download and execute to create and execute your programs 'written in Java'. If you have a Java program that only makes use of the 'core classes' and requires no 'enterprise services' you execute your Java program on top of the JSE. Finally, if you need to provide some functionality and any of the Java EE specification's implementations cover any of your needs, say you need to process HTTP requests; you create a component as dictated by the spec (a Servlet in this case) and deploy it into your Java EE container -Tomcat, for example-.
总结一下,我会说 JDK 只是一组您下载和执行以创建和执行“用 Java 编写”的程序的程序。如果您有一个只使用“核心类”并且不需要“企业服务”的 Java 程序,您可以在 JSE 之上执行您的 Java 程序。最后,如果您需要提供一些功能并且任何 Java EE 规范的实现都满足您的任何需求,假设您需要处理 HTTP 请求;您按照规范(在本例中为 Servlet)的规定创建一个组件,并将其部署到您的 Java EE 容器 - 例如 Tomcat - 中。
Hope this helps
希望这可以帮助
回答by Seth
JDK= java development kit.
JDK= Java 开发工具包。
Java SE= java standard edition (aka JRE)
Java SE= Java 标准版(又名 JRE)
Java EE= java enterprise edition (aka J2EE)
Java EE= Java 企业版(又名 J2EE)
Update: Sun isn't well known for their clear naming conventions (Java 1.5 and Java 5.0 are the same thing, for example).
更新:Sun 并不以其明确的命名约定而闻名(例如,Java 1.5 和 Java 5.0 是同一回事)。
It boils down to this: If you want to runjava applications, go to http://www.java.comand click on the Download button.
归结为:如果您想运行Java 应用程序,请访问http://www.java.com并单击下载按钮。
If you want to writejava applications, go to http://developer.sun.comand wade through it until you find a download that's about 80 MB called "JDK". There are several different versions of the JDK based on what kinds of stuff you're developing (web applications, console applications, etc.).
如果您想编写Java 应用程序,请访问http://developer.sun.com并浏览它,直到您找到一个大约 80 MB 的名为“JDK”的下载。根据您正在开发的内容类型(Web 应用程序、控制台应用程序等),有几个不同版本的 JDK。
回答by tmpvar
JDK = Java Development Kit
JDK = Java 开发工具包
Java SE = Java Standard Edition
Java SE = Java 标准版
Java EE = Java Enterprise Edition
Java EE = Java 企业版
回答by Horst Gutmann
In general JDK refers to the Java SE Development Kit. You can also see the abbreviation on the respective download pageand not on the one for the Java EE Development Kit or the Java ME Development Kit.
通常,JDK 是指 Java SE 开发工具包。您还可以在相应的下载页面而不是 Java EE Development Kit 或 Java ME Development Kit 的下载页面上看到该缩写。
回答by alfredozn
Using the definitions above, you will find a JDK for Java SE (a set of java features) and a JDK for the Java EE (the features in Java SE + some "enterprise" features).
使用上面的定义,您将找到一个用于 Java SE(一组 Java 特性)的 JDK 和一个用于 Java EE 的 JDK(Java SE 中的特性 + 一些“企业”特性)。
The Java Standard Edition and Java Enterprise Edition are the definition and APIs of the Java language, and the JDK are the tools you need to develop something using those features.
Java 标准版和 Java 企业版是 Java 语言的定义和 API,而 JDK 是使用这些功能开发某些东西所需的工具。
回答by Brian Agnew
When you download the standardJava development kit, you get the standard edition of Java (Java SE) in a development form (JDK). The Java runtime (JRE) is the same set of libraries etc. without the development tools (compiler etc.)
当您下载标准Java 开发工具包时,您会以开发形式 (JDK) 获得 Java (Java SE) 的标准版。Java 运行时 (JRE) 是同一套库等,没有开发工具(编译器等)
Java EE is a set of additional APIs/interfaces (and most usually, some implementations of these). These are APIs for web applications, EJBs etc. You can use the JDK to build for this, provided you have the additional APIs and the implementations. Most usually a Java EE application will run in an application or web container.
Java EE 是一组额外的 API/接口(通常是这些的一些实现)。这些是用于 Web 应用程序、EJB 等的 API。如果您有额外的 API 和实现,您可以使用 JDK 来构建它。大多数情况下,Java EE 应用程序将在应用程序或 Web 容器中运行。
Note (also) that until very recently, Java SE was known as J2SE, and Java EE was known as J2EE. The situation is confused further by the fact that many people (especially recruiters) confuse J2EE with EJBs (which are only one of the technologies in Java EE).
请注意(还)直到最近,Java SE 还被称为 J2SE,而 Java EE 被称为 J2EE。许多人(尤其是招聘人员)将 J2EE 与 EJB(这只是 Java EE 中的一种技术)混淆,这一事实使情况更加混乱。
You're not alone in being confused by this. I regularly encounter experienced professionals who struggle with precisely what these mean, and Sun doesn't help by introducing Java 2 v1.6 (or is it Java 6?), and renaming J2EE to Java EE.
对此感到困惑的并不只有您一个人。我经常遇到有经验的专业人士,他们正在为这些究竟意味着什么而苦苦挣扎,而 Sun 并没有通过引入 Java 2 v1.6(或者是 Java 6?)并将 J2EE 重命名为 Java EE 来提供帮助。
回答by Will Hartung
To be more clear
为了更清楚
Java SE -- Java Standard Edition, it happens to come in two versions: the JDK and JRE. JDK has the compiler and other tools.
Java SE——Java 标准版,它有两个版本:JDK 和 JRE。JDK 有编译器和其他工具。
Java EE -- Java Enterprise Edition is simply a standard, and a couple of libraries consisting mostly of just interfaces. While there are 'stand alone' components that can be downloaded for Java EE, alone they're of little value (again, being mostly just interfaces), and are typically bundled with the container you use to deploy or develop Java EE applications on. Plus Java EE comprises as an umbrella of many standards (JMS, JSF, etc. etc.).
Java EE——Java 企业版只是一个标准,以及几个主要由接口组成的库。虽然有可以为 Java EE 下载的“独立”组件,但它们本身没有什么价值(同样,主要只是接口),并且通常与用于部署或开发 Java EE 应用程序的容器捆绑在一起。此外,Java EE 包含许多标准(JMS、JSF 等)的总括。