14

Please confirm the above statement?

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

bdoughan
  • 147,609
  • 23
  • 300
  • 400
ajsie
  • 77,632
  • 106
  • 276
  • 381

7 Answers7

59

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

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Ytsejammer
  • 1,384
  • 2
  • 13
  • 25
  • thx it helped a lot. so that makes Java SE a part of JDK basically. – ajsie Jan 07 '10 at 23:26
  • hmm would u say Java SE = JDK + JRE or JDK = Java SE + JRE? – ajsie Jan 07 '10 at 23:30
  • 3
    I would strive for the latter rather than the former. I think it's fair to say that the JDK is a JRE (the Virtual Machine) plus the Java SE classes. To make your statement more accurate, I would include those less visible tools like the compiler, the JAR tool, JAR signer and things like that that you get with the JDK. I think it's a matter of opinion. That's why I just put what I consider 'raw facts' in my original reply. Best, YJ – Ytsejammer Jan 08 '10 at 01:11
11

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.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Brian Agnew
  • 268,207
  • 37
  • 334
  • 440
  • You probably meant to say J2EE instead of J2SE in the last sentence :) +1 nevertheless. – BalusC Jan 07 '10 at 22:53
  • IIRC, the "Java 2" thing was abolished after release 1.4, and since then it's supposed to be "Java 5" and "Java 6". – Michael Borgwardt Jan 07 '10 at 23:20
  • @Michael - yes, I think you're right. I couldn't *quite* remember the details – Brian Agnew Jan 08 '10 at 00:07
  • You say "The Java EE containers (WebLogic, WebSphere, Tomcat) provide actual implementations of these specifications as classes." Does that mean that the javax.* classes, found under https://docs.oracle.com/javaee/6/api/allclasses-noframe.html, are actually not provided/written by Oracle, but rather by third parties? – Phillip Jul 26 '17 at 14:27
6

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

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.

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
alfredozn
  • 314
  • 3
  • 16
  • but why do they have JDK6 = JSE on their site. and when it comes to JEE they just call it JEE. – ajsie Jan 07 '10 at 22:40
  • If it is true, how can Java EE JDK version 8 can contain Java SE JDK version 10 features and libraries as the latter JDK has released too later than the EE version? – Jack Oct 12 '18 at 08:52
5

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

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Will Hartung
  • 115,893
  • 19
  • 128
  • 203
  • They're both Java SE. The JRE is the runtime component. Most anything that is a "Java SE" application will run on the JRE. For example, Tomcat, a JEE compliant web container is, arguably, a JSE application as it only needs the JRE to run, even though it implements a portion of JEE. In the past, Tomcat required the JDK so it could use the Java compiler. But today, it simply needs the JRE. If anything, the JDK is a superset of JSE. – Will Hartung Jan 08 '10 at 00:57
2

In general JDK refers to the Java SE Development Kit. You can also see the abbreviation on the respective download page and not on the one for the Java EE Development Kit or the Java ME Development Kit.

Horst Gutmann
  • 10,910
  • 2
  • 28
  • 31
0

JDK = java development kit.

Java SE = java standard edition (aka JRE)

Java EE = java enterprise edition (aka 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).

It boils down to this: If you want to run java applications, go to http://www.java.com and click on the Download button.

If you want to write java applications, go to http://developer.sun.com and 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.).

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Seth
  • 45,033
  • 10
  • 85
  • 120
  • but when i go to the download page for JSE it says JDK6. So JSE = JDK? And are you sure that JSE = JRE? isnt the JRE the runtime environment (u need it to open java applications) and JSE the development environment (u need it to develop java applications)? – ajsie Jan 07 '10 at 22:34
  • @unknown: The distinction between the Runtime Edition and the Development Kit have IMO little to do with the distinction between Standard Edition and Enterprise Edition. The download page even states, that the JRE is part of the JDK (since how would you execute the compiled code if not with the runtime components ;-) ). – Horst Gutmann Jan 07 '10 at 23:36
  • Very wrong correlation. JRE is not a.k.a. JavaSE (or J2SE). JRE is just a minimum you need to run your Java applications - it's Java Runtime Environment, whereas J2SE is a specification for Standard Java Libraries. – Giorgi Tsiklauri May 03 '18 at 07:10
-3

JDK = Java Development Kit

Java SE = Java Standard Edition

Java EE = Java Enterprise Edition

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
tmpvar
  • 1,331
  • 1
  • 8
  • 12