Course – LS (cat=Java)

Get started with Spring and Spring Boot, through the Learn Spring course:


1. Overview

In this short tutorial, we’ll compare the three different Java Editions. We’ll see what functionalities they provide and their typical use cases.

2. Java Standard Edition

Let’s start with the Java Standard Edition, or Java SE, for short. This edition provides the core functionalities of the Java language.

Java SE provides the essential components for Java applications: Java Virtual Machine, Java Runtime Environment, and Java Development Kit. As of writing this article, the latest version is Java 18.

Let’s describe a simple use case for a Java SE application. We can implement the business logic using OOP concepts, make HTTP requests using the package, and connect to a database with JDBC. We can even display a user interface using Swing or AWT.

3. Java Enterprise Edition

Java EE is based on the Standard Edition and provides even more APIs. The abbreviation stands for Java Enterprise Edition, but it can be called Jakarta EE. They both refer to the same thing.

The new Java EE APIs allow us to create larger, scalable applications.

Generally, Java EE applications are deployed to an application server. Many web-related APIs are provided to facilitate this: WebSocket, JavaServer Pages, JAX-RS, etc. The enterprise features also include APIs related to JSON processing, security, Java Message Service, JavaMail, etc.

In a Java EE application, we can use everything from the standard APIs. On top of that, we can use more advanced technologies.

Now let’s see a use case for Java EE. For example, we can create servlets to process HTTP requests from users and create dynamic UI using JavaServer Pages. We can produce and consume messages using JMS, send emails and authenticate users to make our application secure. Furthermore, we can use the dependency injection mechanism to make our code more maintainable.

4. Java Micro Edition

Java Micro Edition or Java ME provides APIs for applications targeting embedded and mobile devices. These can be mobile phones, set-top boxes, sensors, printers, etc.

Java ME includes some Java SE functionalities while providing new APIs specific to these devices. For example, Bluetooth, location, sensor APIs, etc.

Most of the time, these small devices have resource constraints in terms of CPU or memory. We must consider these constraints when using Java ME.

Sometimes the target device might not even be available to us to test our code. The SDK can help with this because it provides emulators, application profiling, and monitoring.

For instance, a simple Java ME application could read a temperature sensor’s value and send it in an HTTP request along with its location.

5. Conclusion

In this short article, we got to know what the three Java Editions are, and we compared the functionalities that each of them provides.

Java SE can be used for simple applications. It’s the best starting point for learning Java. We can use Java EE to create more complex and robust applications. Finally, we can use Java ME if we would like to target embedded and mobile devices.

Course – LS (cat=Java)

Get started with Spring and Spring Boot, through the Learn Spring course:

res – REST with Spring (eBook) (everywhere)
Comments are closed on this article!