# Helidon — Java Microservices Framework by Oracle > A set of Java libraries for writing microservices that run on a fast Helidon WebServer underpinning, with support for MicroProfile and a reactive programming model. ## Install Save as a script file and run: # Helidon — Java Microservices Framework by Oracle ## Quick Use ```bash # Generate a Helidon MP project using the CLI curl -O https://helidon.io/cli/latest/linux/helidon chmod +x helidon ./helidon init --flavor MP --groupid com.example --artifactid myapp cd myapp mvn package java -jar target/myapp.jar # Server starts on http://localhost:8080 ``` ```java // JAX-RS resource in Helidon MP @Path("/greet") public class GreetResource { @GET @Produces(MediaType.APPLICATION_JSON) public JsonObject getGreeting() { return Json.createObjectBuilder() .add("message", "Hello from Helidon!") .build(); } } ``` ## Introduction Helidon is a collection of Java libraries developed by Oracle for building microservices. It offers two programming models: Helidon MP (MicroProfile) for developers who prefer annotation-driven JAX-RS style, and Helidon SE for those who want a lightweight functional/reactive approach without dependency injection frameworks. ## What Helidon Does - Provides a fast embedded web server based on virtual threads (Loom) in Helidon 4.x - Implements the Eclipse MicroProfile specification including Config, Health, Metrics, and OpenAPI - Offers a functional reactive API (Helidon SE) for building services without annotations or CDI - Integrates with GraalVM Native Image for ahead-of-time compilation to reduce startup time and memory - Supports built-in service mesh features like tracing (OpenTracing/OpenTelemetry), fault tolerance, and JWT authentication ## Architecture Overview Helidon 4.x is built on virtual threads (Project Loom), replacing the earlier reactive Netty-based server. Helidon MP layers MicroProfile APIs (CDI, JAX-RS, JSON-P/JSON-B) on top of the core web server, while Helidon SE exposes the same server through a functional routing API without a CDI container. Both flavors share the same underlying HTTP engine, configuration system, and security framework, so features like health checks, metrics endpoints, and tracing work identically regardless of programming model. ## Self-Hosting & Configuration - Requires JDK 21 or later for virtual thread support in Helidon 4.x - Use Maven or Gradle with the Helidon BOM (Bill of Materials) for dependency management - Application configuration is loaded from application.yaml or microprofile-config.properties with environment variable overrides - Build native executables with GraalVM using the native-image Maven plugin included in Helidon archetypes - Deploy as a standalone JAR, a Docker container, or on Kubernetes with the provided Dockerfile templates ## Key Features - Virtual-thread-based server that handles high concurrency without reactive complexity - Dual programming models (MP and SE) sharing the same runtime and configuration system - Full MicroProfile compliance for portability across compliant implementations - GraalVM Native Image support for sub-second startup times - Built-in observability with health checks, Prometheus-compatible metrics, and distributed tracing ## Comparison with Similar Tools - **Quarkus** — Red Hat's Java framework with hot reload and native compilation; larger ecosystem and community - **Micronaut** — compile-time DI framework; similar startup performance but uses annotation processing instead of virtual threads - **Spring Boot** — dominant Java framework; more libraries and integrations but heavier baseline footprint - **Vert.x** — reactive toolkit by Eclipse; event-loop model vs. Helidon's virtual-thread approach ## FAQ **Q: What is the difference between Helidon SE and Helidon MP?** A: Helidon SE is a functional API with no dependency injection container, suited for developers who want full control. Helidon MP implements Eclipse MicroProfile with CDI and JAX-RS annotations, suited for those familiar with Jakarta EE patterns. **Q: Does Helidon support GraalVM native images?** A: Yes. Both Helidon SE and MP support GraalVM Native Image compilation. The Helidon CLI and Maven archetypes include native-image profiles out of the box. **Q: How does Helidon 4.x differ from earlier versions?** A: Helidon 4.x replaced the Netty-based reactive server with a virtual-thread server (Project Loom), simplifying the programming model by allowing blocking-style code that scales like reactive code. **Q: Can Helidon run on Kubernetes?** A: Yes. Helidon projects generated by the CLI include Dockerfiles and Kubernetes YAML manifests. Health and readiness endpoints are enabled by default for probe configuration. ## Sources - https://github.com/helidon-io/helidon - https://helidon.io/docs/v4/about/doc_overview --- Source: https://tokrepo.com/en/workflows/asset-b17f8331 Author: Script Depot