Java Notes
Complete guide to Java editions — Java SE, Java EE (Jakarta EE), Java ME, and JavaFX. Understand which edition to use for desktop, web, enterprise, mobile, and embedded development.
Java is not a single monolithic platform — it's organized into different editions, each targeting a specific type of application development. Understanding these editions helps you choose the right tools for your project.
Overview of Java Editions
Java has four main editions (platforms):
| Edition | Full Name | Target | Status |
|---|---|---|---|
| Java SE | Standard Edition | Desktop apps, core libraries | Active (Java 21+) |
| Java EE | Enterprise Edition | Web & enterprise apps | Renamed to Jakarta EE |
| Java ME | Micro Edition | Mobile & embedded | Legacy/declining |
| JavaFX | (was part of SE) | Rich desktop/UI apps | Separate project (OpenJFX) |
// A simple way to check which Java SE version you're running
public class JavaEditionCheck {
public static void main(String[] args) {
System.out.println("Java SE Version: " + System.getProperty("java.version"));
System.out.println("Java SE Spec: " + System.getProperty("java.specification.version"));
System.out.println("Vendor: " + System.getProperty("java.vendor"));
System.out.println("VM Name: " + System.getProperty("java.vm.name"));
System.out.println("Runtime: " + System.getProperty("java.runtime.name"));
}
}Java SE Version: 21.0.1 Java SE Spec: 21 Vendor: Oracle Corporation VM Name: OpenJDK 64-Bit Server VM Runtime: OpenJDK Runtime Environment
Java SE (Standard Edition)
Java SE is the foundation of all Java development. Every other edition builds on top of Java SE.
What Java SE Includes
Java SE provides:
- Core Language Features — classes, interfaces, generics, lambdas, modules
- Standard Libraries — collections, I/O, networking, concurrency, security
- Development Tools — compiler (javac), debugger (jdb), documentation (javadoc)
- JVM — the runtime environment
Key Java SE Packages
// Core packages available in Java SE
import java.lang.*; // Fundamental classes (auto-imported)
import java.util.*; // Collections, Date, Scanner, etc.
import java.io.*; // Input/Output streams
import java.nio.*; // New I/O (non-blocking)
import java.net.*; // Networking (sockets, URLs)
import java.sql.*; // Database connectivity (JDBC)
import java.math.*; // BigInteger, BigDecimal
import java.time.*; // Date/Time API (Java 8+)
import java.util.stream.*; // Stream API (Java 8+)
import java.util.concurrent.*; // Concurrency utilities
public class JavaSEDemo {
public static void main(String[] args) {
// Collections Framework
List<String> languages = new ArrayList<>(
List.of("Java", "Python", "JavaScript")
);
// Stream API (Java 8+)
languages.stream()
.filter(lang -> lang.startsWith("J"))
.map(String::toUpperCase)
.forEach(System.out::println);
// Date/Time API (Java 8+)
LocalDateTime now = LocalDateTime.now();
System.out.println("Current time: " + now);
// Concurrency
CompletableFuture<String> future = CompletableFuture.supplyAsync(() -> {
return "Async result from Java SE!";
});
System.out.println(future.join());
}
}JAVA JAVASCRIPT Current time: 2024-01-15T14:30:45.123 Async result from Java SE!
Java SE Version History (LTS versions)
| Version | Year | Key Features |
|---|---|---|
| Java SE 8 | 2014 | Lambdas, Streams, Date/Time API |
| Java SE 11 | 2018 | HTTP Client, var in lambdas, single-file execution |
| Java SE 17 | 2021 | Sealed classes, pattern matching, records |
| Java SE 21 | 2023 | Virtual threads, sequenced collections |
Who Uses Java SE?
- Desktop application developers — command-line tools, utilities
- All Java developers — SE is the foundation for EE and ME
- Library authors — frameworks build on SE APIs
- Android developers — Android uses a subset of Java SE
Java EE / Jakarta EE (Enterprise Edition)
Java EE extends Java SE with APIs for building large-scale, distributed, multi-tier enterprise applications.
The Transition: Java EE → Jakarta EE
In 2017, Oracle transferred Java EE to the Eclipse Foundation, which renamed it Jakarta EE (because Oracle retained the "Java" trademark for specifications).
| Old Name | New Name | Package Change |
|---|---|---|
| Java EE 8 | Jakarta EE 8 | javax.* → jakarta.* |
| javax.servlet | jakarta.servlet | Starting Jakarta EE 9 |
| javax.persistence | jakarta.persistence | Starting Jakarta EE 9 |
Key Jakarta EE Technologies
// Example: A Jakarta EE REST API endpoint
// (This runs on an application server like WildFly, Payara, or TomEE)
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.*;
import jakarta.inject.Inject;
@Path("/users")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public class UserResource {
@Inject
private UserService userService;
@GET
public List<User> getAllUsers() {
return userService.findAll();
}
@GET
@Path("/{id}")
public Response getUser(@PathParam("id") Long id) {
User user = userService.findById(id);
if (user == null) {
return Response.status(Response.Status.NOT_FOUND).build();
}
return Response.ok(user).build();
}
@POST
public Response createUser(User user) {
userService.save(user);
return Response.status(Response.Status.CREATED).entity(user).build();
}
}Jakarta EE Specifications
| Technology | Purpose |
|---|---|
| Servlet | HTTP request/response handling |
| JSP/JSF | Web page rendering |
| JAX-RS | RESTful web services |
| JPA | Object-relational database mapping |
| EJB | Enterprise business logic components |
| CDI | Dependency injection |
| JMS | Asynchronous messaging |
| JTA | Transaction management |
| Bean Validation | Data validation |
| WebSocket | Real-time bidirectional communication |
Java EE vs Spring Framework
While Jakarta EE is the official enterprise standard, Spring Boot has become the dominant framework for Java enterprise development:
// Spring Boot equivalent (most popular choice today)
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;
@RestController
@RequestMapping("/api/users")
public class UserController {
@Autowired
private UserService userService;
@GetMapping
public List<User> getAll() {
return userService.findAll();
}
@PostMapping
public User create(@RequestBody User user) {
return userService.save(user);
}
}| Aspect | Jakarta EE | Spring Boot |
|---|---|---|
| Configuration | XML/annotations | Auto-configuration |
| Server | External (WildFly, Payara) | Embedded (Tomcat) |
| Startup | Slower | Fast |
| Learning Curve | Steeper | Moderate |
| Industry Usage | Large enterprises | Everywhere |
| Microservices | MicroProfile | Spring Cloud |
Java ME (Micro Edition)
Java ME is a stripped-down version of Java SE designed for resource-constrained devices.
What Java ME Targets
- Feature phones (pre-smartphone era)
- Set-top boxes
- Embedded systems
- IoT devices
- Smart cards (Java Card)
Java ME Configurations
| Configuration | Target | Memory |
|---|---|---|
| CLDC (Connected Limited Device) | Phones, PDA | 128KB-512KB |
| CDC (Connected Device) | Set-top boxes, car systems | 2MB+ |
// Java ME MIDlet example (runs on feature phones)
// This is legacy code — shown for historical understanding
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class HelloMIDlet extends MIDlet {
private Display display;
private Form form;
public void startApp() {
display = Display.getDisplay(this);
form = new Form("Hello Java ME");
form.append("Running on a small device!");
display.setCurrent(form);
}
public void pauseApp() { }
public void destroyApp(boolean unconditional) { }
}Current Status of Java ME
Java ME is largely obsolete for new development:
- Smartphones (Android/iOS) replaced feature phones
- Android uses its own runtime (ART), not Java ME
- IoT devices now use Java SE Embedded or other solutions
- Java Card (smart cards, SIM cards) is the only active Java ME technology
JavaFX
JavaFX was Oracle's replacement for Swing as Java's modern GUI toolkit.
JavaFX Features
- Hardware-accelerated graphics
- CSS styling for UI components
- FXML for declarative layouts
- Rich media support (audio, video)
- 3D graphics
- WebView (embedded browser)
JavaFX Status
- Removed from JDK 11 (was part of JDK 8-10)
- Now maintained as OpenJFX (open-source, separate download)
- Still actively developed (latest: JavaFX 21)
- Used for desktop apps, dashboards, and scientific visualization
Choosing the Right Edition
For: web application Use: Java SE + Spring Boot (or Jakarta EE)
Decision Matrix
| Project Type | Recommended Stack |
|---|---|
| Learning Java | Java SE (JDK 21) |
| REST API / Backend | Java SE + Spring Boot |
| Enterprise (large company) | Jakarta EE or Spring Boot |
| Desktop GUI | Java SE + JavaFX |
| Android Mobile | Android SDK (Kotlin preferred, Java supported) |
| Big Data | Java SE + Hadoop/Spark |
| Microservices | Java SE + Spring Boot + Spring Cloud or Quarkus |
Modern Java Ecosystem Beyond Editions
Today, the "edition" concept is less important than the framework choice:
| Framework | Based On | Use Case |
|---|---|---|
| Spring Boot | Java SE | Web apps, microservices, APIs |
| Quarkus | Java SE + Jakarta EE | Cloud-native, fast startup |
| Micronaut | Java SE | Microservices, serverless |
| Vert.x | Java SE | Reactive, event-driven |
| Helidon | Java SE | Oracle's microservice framework |
Common Mistakes
- Thinking you need to "install" Java EE separately — Java EE/Jakarta EE is a set of specifications. You need an implementation (WildFly, Payara) or use Spring Boot which includes what you need.
- Confusing Java SE version with Java EE version — Java SE 21 and Jakarta EE 10 are different things with different version numbers.
- Starting with Java EE for learning — Always learn Java SE first. EE builds on SE concepts.
- Thinking Java ME is for Android — Android has its own runtime (ART) and SDK. It doesn't use Java ME.
- Assuming JavaFX is dead — It's alive as OpenJFX, just no longer bundled with JDK. You add it as a dependency.
Interview Questions
Q1: What are the different editions of Java?
Answer: Java has three main editions: (1) Java SE (Standard Edition) — the core platform with fundamental libraries and JVM, used for desktop and general-purpose development; (2) Java EE (Enterprise Edition), now Jakarta EE — extends SE with APIs for building enterprise web applications; (3) Java ME (Micro Edition) — a stripped-down version for resource-constrained embedded and mobile devices.
Q2: What is the relationship between Java SE and Java EE?
Answer: Java EE (Jakarta EE) is built on top of Java SE. It includes all of Java SE plus additional APIs for enterprise features like servlets, JPA, CDI, JAX-RS, and EJB. You cannot use Java EE without Java SE — SE is the foundation.
Q3: What happened to Java EE?
Answer: In 2017, Oracle transferred Java EE to the Eclipse Foundation, which renamed it Jakarta EE because Oracle retained the "Java" trademark. Starting with Jakarta EE 9, all package names changed from javax.* to jakarta.*. The technology continues to evolve under Eclipse Foundation governance.
Q4: Which Java edition should a beginner start with?
Answer: Always start with Java SE. It contains the core language, standard libraries, and development tools. Everything else (EE frameworks, JavaFX, etc.) is built on top of SE concepts. Once you master SE fundamentals, you can choose a framework like Spring Boot or Jakarta EE based on your career goals.
Q5: Is Java ME still relevant today?
Answer: Java ME is mostly obsolete for general development. Smartphones replaced feature phones, and Android uses its own runtime. However, Java Card (a Java ME technology) is still actively used in billions of smart cards, SIM cards, and payment cards worldwide.
Summary
Java's editions reflect different deployment targets: SE for the core platform, EE/Jakarta for enterprise web applications, ME for embedded devices, and JavaFX for rich desktop UIs. In modern Java development, the most common path is Java SE combined with a framework like Spring Boot. Understanding editions helps you navigate job postings, documentation, and architectural decisions.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Java Editions.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Java Master Course topic.
Search Terms
java-master-course, java master course, java, master, course, fundamentals, introduction, editions
Related Java Master Course Topics