JDK = Java SE&& JDK!= Java EE? [英] JDK = Java SE && JDK != Java EE?

查看:140
本文介绍了JDK = Java SE&& JDK!= Java EE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请确认上述声明?

我们需要知道他们提到JDK时所指的是什么。

I need to know what they are referring to when they mention JDK.

推荐答案

Java Development Kit 是我们通常引用一组工具来创建Java应用程序的方式,包括Java编译器(用于翻译JAVA Source类)到.class字节码文件),Java虚拟机(执行那些.class文件),JAR工具到ZIP应用程序(或提取它们)等等。

Java Development Kit is 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 Standard Edition 通常是指构成大多数Java程序基础的核心类,例如Collections API(List,Map,Set等),java.lang中的类。包,I / O类,Threading API,RMI包和类,i18n(国际化)类,JDBC API,当然还有用于创建桌面应用程序和applet的AWT和Swing类。这些API是您可以用Java编写的所有其他程序的基础,例如IntelliJ IDEA IDE,Servlet容器(如Tomcat),RDBMS(如Apache Derby)或自定义独立客户端(如SQuirreL)。这些类是作为JDK的一部分获得的(只需在JDK文件夹下打开src.zip文件,看看你在那里找到了什么:))

The Java Standard Edition usually 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 EE是一个具有子规范的规范,作为一个整体,它定义了一组服务,这些服务实现(例如GlassFish或IBM的WebSphere)应该提供以符合规范。这些实现是所谓的Java EE容器。当你听到人们说GlassFish是Java EE 1.6实现时,他们意味着GlassFish(使用 Java Standard Edition 类编写的Java程序)提供Java EE 6系列规范的所有功能定义。

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 Edition classes) provides all the features that the Java EE 6 family of specifications define.

Java EE规范应该涵盖企业应用程序开发领域的特定需求,例如用于HTTP请求 - 响应处理的Servlet规范,用于事务管理和组件生命周期管理的EJB规范,用于消息传递服务的JMS规范等。 Java EE容器(WebLogic,WebSphere,Tomcat)将这些规范的实际实现提供为类。在过于简化的语句中,这些容器为Java EE API提供JAR。这些JAR文件中的类使用Java SE核心类。我认为最后一句话是Java SE和Java EE之间的联系。

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.

为了解决这个问题,我想说JDK只是你下载的一组程序,执行以创建和执行用Java编写的程序。如果您的Java程序只使用核心类而不需要企业服务,那么您可以在JSE之上执行Java程序。最后,如果您需要提供某些功能,并且任何Java EE规范的实现都满足您的任何需求,那么您需要处理HTTP请求;您可以根据规范(在本例中为Servlet)创建组件,并将其部署到Java EE容器中 - 例如--Tomcat。

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 SE&& JDK!= Java EE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆