Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JDK = Java SE && JDK != Java EE?

Tags:

java

Please confirm the above statement?

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

like image 792
ajsie Avatar asked Jan 07 '10 22:01

ajsie


People also ask

What is Java JDK vs SE?

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.

Is Java SE the same as Java JDK?

There has been a lot of confusion lately about Java and its available SDKs (Software Development Kits). You might've heard the Java SDK called the JDK. They're one and the same. Java SE (Standard Edition) is a specification that's governed by the JCP (Java Community Process).

Is JDK included in Java SE?

Java SE includes: The Java Development Kit (JDK), including the JavaFX Software Development Kit (SDK), Java Runtime Environment (JRE), (Server and regular packages)

What is Java SE version?

Java Platform, Standard Edition 18 Java SE 18.0. 2.1 is the latest release of Java SE Platform. Oracle strongly recommends that all Java SE users upgrade to this release.


2 Answers

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.

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 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.

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.

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-.

Hope this helps

like image 190
Ytsejammer Avatar answered Sep 21 '22 20:09

Ytsejammer


When you download the standard Java 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 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.

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).

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.

like image 23
Brian Agnew Avatar answered Sep 18 '22 20:09

Brian Agnew