Difference Between Java Se/Ee/Me

Difference between Java SE/EE/ME?

Java SE = Standard Edition. This is the core Java programming platform. It contains all of the libraries and APIs that any Java programmer should learn (java.lang, java.io, java.math, java.net, java.util, etc...).

Java EE = Enterprise Edition. From Wikipedia:

The Java platform (Enterprise Edition) differs from the Java Standard
Edition Platform (Java SE) in that it adds libraries which provide
functionality to deploy fault-tolerant, distributed, multi-tier Java
software, based largely on modular components running on an
application server.

In other words, if your application demands a very large scale, distributed system, then you should consider using Java EE. Built on top of Java SE, it provides libraries for database access (JDBC, JPA), remote method invocation (RMI), messaging (JMS), web services, XML processing, and defines standard APIs for Enterprise JavaBeans, servlets, portlets, Java Server Pages, etc...

Java ME = Micro Edition. This is the platform for developing applications for mobile devices and embedded systems such as set-top boxes. Java ME provides a subset of the functionality of Java SE, but also introduces libraries specific to mobile devices. Because Java ME is based on an earlier version of Java SE, some of the new language features introduced in Java 1.5 (e.g. generics) are not available.

If you are new to Java, definitely start with Java SE.

Difference between Java SE & Java EE

Java SE (standard edition) is just the normal specification of Java. Java EE (enterprise edition) is Java with all sorts of add-ons for enterpris-y things like:

  • Enterprise JavaBeans;
  • Java Persistence API;
  • Servlets;
  • Java Server Pages.

(not an exhaustive list, more detail available on Wikipedia). You generally get Java SE when you download the SDK (for development) or JRE (for running Java applications).

On the other hand, you generally get all the Java EE goodies when you start using IBM Websphere Application Server, or JBoss, or another enterprise-class application server.

You can download the Oracle Java EE 6 SDK here. The JSR for Java EE 6 is here.

What is Spring Framework Built on

Java SE is plain old Java, hence SE (Standard Edition). Java EE (Enterprise edition) is a set of APIs that a server has to implement to be licensed as Java EE compatible. Oracle / Sun has created the SE and a reference implementation of EE ( Glassfish ), but EE is usually implemented by Application servers (JBoss, WebSphere etc.).

Spring is built on Java SE, but can run (and use some of the features of) Java EE. It can also be an alternative for when the full EE stack is not available, allowing non-EE platforms to integrate EE technologies like JPA or JMS.

Spring vs Java EE is an ongoing holy war, although it doesn't need to be. I personally prefer Spring because it doesn't require a special server infrastructure and runs in any environment (Java App, Applet, Servlet, Android, you name it), but the other side has very convincing arguments also (at least for EE 6+). And then there are those who advocate using Spring together with EE, but I guess that's no longer very relevant for EE 6.

Java JDK, SDK, SE?

Yes, it can be confusing.

You didn't ask for it, but I'll start from here. The JVM is the Java Virtual Machine. It is a program that can read compiled Java code (the .class files, and the .jar files that are simply .zip files containing a bunch of .class files packaged together) and execute it. There are many JVMs, for example you need a JVM for Windows, one for Linux, one for OSX etc. but there are also many alternative JVMs, JVMs for embedded device etc. (many will disagree and say that the JVM is only one, and it's a specification. However, commonly a sysadmin will say "the JVM" to indicate the actual binary running on the server).

You didn't ask for the following either. The JRE is the Java Runtime Environment. It includes everything needed to run a Java application, that is the JVM itself, the standard library and a bunch of other files. The standard library is itself very important, because it contains a lot of useful things you'll use when developing Java applications. It contains all the stuff in java.* packages and some private stuff in com.sun, com.oracle packages.

Different versions of Java (1.0, 1.1, etc. all the way to 1.7, also known as Java 7) usually contain improvements to both the JVM and the standard library, so the two usually need to run together, and are packaged together in the JRE.

If you are running any Java program on your computer, you have a JRE installed.

The JDK is the Java Development Kit. It contains the JRE as well as a lot of other useful stuff for developing Java applications. That includes the compiler obviously (which is also contained in the JRE for some good reason, but you can ignore this fact now), the JAR utility to create .jar files, many tools for "decompiling" class files, inspect .jar files, repackage them, etc.

It also usually contains documentation for the standard library and also all the sources of the standard library, because they are useful for developers to read and inspect. If you want to seriously develop Java applications, you need the JDK.

When talking about JavaSE, JavaEE, JavaME etc. those are so called "editions". Basically, since the Java ecosystem is huge, Sun decided to offer Java in different editions:

  • JavaSE: is the standard edition, it is usually a good fit for client side software, normal applications, etc.
  • JavaME: is the mobile edition, it is what small games on old phones was made with, but it's basically a "smaller" version of Java suitable for very low capacity processors.
  • JavaEE: is the "enterprise edition". It is used to develop server side stuff, so it includes a lot of libraries used on server side.

Regarding numbering, they messed it up quite a bit. Actually, after Java 1.4 they created the JCP, to involve the community in the development of Java itself, and starting from Java 1.5 it is officially named "Java 5", despite most in the industry calling it 1.5. Also, Java 1.2 was Java 2, but everyone I know who was not working in Sun at that time always called it 1.2.

Java EE container internals

Java SE = Standard Edition. This is the core Java programming
platform. It contains all of the libraries and APIs that any Java
programmer should learn (java.lang, java.io, java.math, java.net,
java.util, etc...).

Java EE = Enterprise Edition. From Wikipedia:

The Java platform (Enterprise Edition) differs from the Java Standard
Edition Platform (Java SE) in that it adds libraries which provide
functionality to deploy fault-tolerant, distributed, multi-tier Java
software, based largely on modular components running on an
application server. In other words, if your application demands a very
large scale, distributed system, then you should consider using Java
EE. Built on top of Java SE, it provides libraries for database access
(JDBC, JPA), remote method invocation (RMI), messaging (JMS), web
services, XML processing, and defines standard APIs for Enterprise
JavaBeans, servlets, portlets, Java Server Pages, etc...


Source: Difference between Java SE/EE/ME?

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

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



Related Topics



Leave a reply



Submit