jaz is a lightweight utility that simplifies how Java developers run their applications on Azure. By intelligently applying Java Virtual Machine (JVM) options tailored for cloud environments, the tool reduces configuration overhead and improves resource utilization out of the box, with higher potential for better performance.
This tool is ideal for developers who:
- Want better JVM defaults without diving deeply into tuning guides.
- Develop and deploy cloud native microservices with frameworks like Spring Boot, Quarkus, or Micronaut.
- Prefer container-based workflows such as Kubernetes and OpenShift.
- Deploy Java workloads on Azure Container Apps, Azure Kubernetes Service, or Azure Virtual Machines.
No code changes, no lock-in. Just replace: java -Xmx1024m -jar myapp.jar to jaz -jar myapp.jar,
and jaz will manage the JVM configuration automatically
The Azure Command Launcher for Java sits between your container or virtual machine startup command and the JVM. When you launch the tool, it:
- Detects the cloud environment (for example, container limits and available memory).
- Analyzes the workload type and selects best-fit JVM options.
- Launches the Java process with optimized flags, such as Heap sizing, Garbage collector selection and tuning. Logging and diagnostics settings as needed.
- Invisibly relays stdout, stderr, stdin, and OS signals to and from the Java process.
- Monitors the Java process and relays its exit code when it terminates.
- Build project:
mvn -DskipTests clean package - Start project with docker compose:
docker compose up -d
Please use the following Dockerfile to build a docker image with jaz:
# Use any Microsoft Build of OpenJDK base image
FROM mcr.microsoft.com/openjdk/jdk:25-ubuntu
# Add your application.jar
COPY target/jaz-boot-demo-0.0.1-SNAPSHOT.jar /application.jar
EXPOSE 8080
# Use jaz to launch your Java application
CMD ["jaz", "-jar", "application.jar"]For more jaz openjdk images, please visit https://learn.microsoft.com/en-us/java/openjdk/containers.
JAZ_HELP=1 jaz: print the java command that would be executedJAZ_DRY_RUN=1 jaz: print a help messageJAZ_BYPASS=1 jaz: bypass jaz optimization adjustments.JAZ_IGNORE_USER_TUNING=1 jaz: trim user-provided tuning args. Allows jaz to tune the JVM in more cases.
Almost yes. jaz is a java shim that launches your application with the correct JVM options.
root@727b1c5114b1:/usr/bin# ./jaz --version
openjdk 21.0.9 2025-10-21 LTS
OpenJDK Runtime Environment Microsoft-12574458 (build 21.0.9+10-LTS)
OpenJDK 64-Bit Server VM Microsoft-12574458 (build 21.0.9+10-LTS, mixed mode, sharing)
root@727b1c5114b1:/# jaz --help
Usage: java [options] <mainclass> [args...]
(to execute a class)
or java [options] -jar <jarfile> [args...]
(to execute a jar file)
You can run JAZ_DRY_RUN=1 jaz to verify the target command to run:
jaz would run: [/usr/bin/java -XX:+UseG1GC -Xmx5278m -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:+UnlockExperimentalVMOptions -XX:+G1UseTimeBasedHeapSizing -XX:G1PeriodicGCInterval=10000]
There are two processes running in the container: ps eaf or docker top container_id aux
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 03:35 ? 00:00:00 jaz -jar application.jar
root 15 1 21 03:35 ? 00:00:18 /usr/bin/java -XX:NativeMemoryTracking=summary -XX:+UseG1GC -Xmx5243m -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:+Un
And jaz will launch the application with the following command:
/usr/bin/java -XX:NativeMemoryTracking=summary -XX:+UseG1GC -Xmx5256m
-XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=50 -XX:+UnlockExperimentalVMOptions
-XX:+G1UseTimeBasedHeapSizing -XX:G1PeriodicGCInterval=10000 -jar application.jar
jaz is written in Golang, and the binary size is about 10MB.
root@e7d7c3b5596d:/# strings /usr/bin/jaz | grep -i "go1\."
go1.24.10 X:systemcrypto
/home/cloudtest_azpcontainer/.local/share/microsoft-go/go1.24.10-1
/home/cloudtest_azpcontainer/.local/share/microsoft-go/go1.24.10-1/src/internal/abi/abi.go
jaz memory usage:
- VSZ(Virtual memory size): 2054500
- RSS(Resident memory size): 25308
root 1 0.0 0.3 2054500 25500 ? Ssl 03:41 0:00 jaz -jar application.jar
- OpenJDK HotSpot JVM versions 8, 11, 17, and 21.
- tested with the Microsoft Build of OpenJDK and Eclipse Temurin.
$ ubuntu_release=`lsb_release -rs`
$ wget https://packages.microsoft.com/config/ubuntu/${ubuntu_release}/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
$ sudo dpkg -i packages-microsoft-prod.deb
$ sudo apt-get install apt-transport-https
$ sudo apt-get update
$ sudo apt-get install msopenjdk-25
$ sudo apt-get install jaz- jaz: Azure Command Launcher for Java
- Announcing Azure Command Launcher for Java
- Announcing the Public Preview of Azure Command Launcher for Java
- From Complexity to Simplicity: Intelligent JVM Optimizations on Azure
- run-java.sh: Universal startup script for plain Java applications
- Microsoft Build of OpenJDK: https://www.microsoft.com/openjdk
- Container images for the Microsoft Build of OpenJDK: https://learn.microsoft.com/en-us/java/openjdk/containers
- Supercharge Your Quarkus Containers: Auto-Tune JVM Memory with Microsoft JAZ - https://www.the-main-thread.com/p/quarkus-java-jaz-auto-tuning-container-memory