Skip to content


Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Helidon Quickstart MP Example

This example implements a simple Hello World REST service using MicroProfile.

Build and run

With JDK11+

mvn package
java -jar target/helidon-mp.jar

Exercise the application

curl -X GET http://localhost:8080/greet
{"message":"Hello World!"}

curl -X GET http://localhost:8080/greet/Joe
{"message":"Hello Joe!"}

curl -X PUT -H "Content-Type: application/json" -d '{"greeting" : "Hola"}' http://localhost:8080/greet/greeting

curl -X GET http://localhost:8080/greet/Jose
{"message":"Hola Jose!"}

Try health and metrics

curl -s -X GET http://localhost:8080/health
. . .

# Prometheus Format
curl -s -X GET http://localhost:8080/metrics
# TYPE base:gc_g1_young_generation_count gauge
. . .

# JSON Format
curl -H 'Accept: application/json' -X GET http://localhost:8080/metrics
. . .

Build the Docker Image

docker build -t helidon-mp .

Start the application with Docker

docker run --rm -p 8080:8080 helidon-mp:latest

Exercise the application as described above

Deploy the application to Kubernetes

kubectl cluster-info                         # Verify which cluster
kubectl get pods                             # Verify connectivity to cluster
kubectl create -f app.yaml               # Deploy application
kubectl get service helidon-mp  # Verify deployed service

Build a native image with GraalVM

GraalVM allows you to compile your programs ahead-of-time into a native executable. See for more information.

You can build a native executable in 2 different ways:

  • With a local installation of GraalVM
  • Using Docker

Local build

Download Graal VM at, the version currently supported for Helidon is 20.0.

# Setup the environment
export GRAALVM_HOME=/path
# build the native executable
mvn package -Pnative-image

You can also put the Graal VM bin directory in your PATH, or pass -DgraalVMHome=/path to the Maven command.

See for more information.

Start the application:


Multi-stage Docker build

Build the "native" Docker Image

docker build -t helidon-mp-native -f Dockerfile.native .

Start the application:

docker run --rm -p 8080:8080 helidon-mp-native:latest

Build a Java Runtime Image using jlink

You can build a custom Java Runtime Image (JRI) containing the application jars and the JDK modules on which they depend. This image also:

  • Enables Class Data Sharing by default to reduce startup time.
  • Contains a customized start script to simplify CDS usage and support debug and test modes.

You can build a custom JRI in two different ways:

  • Local
  • Using Docker

Local build

# build the JRI
mvn package -Pjlink-image

See for more information.

Start the application:


Multi-stage Docker build

Build the "jlink" Docker Image

docker build -t helidon-mp-jlink -f Dockerfile.jlink .

Start the application:

docker run --rm -p 8080:8080 helidon-mp-jlink:latest

See the start script help:

docker run --rm helidon-mp-jlink:latest --help


Helidon MicroProfile Playground






No releases published


No packages published