Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Azure Command Launcher for Java (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, Azure Red Hat OpenShift, or Azure Virtual Machines.
Key features
- 🛠 Automatically tunes JVM flags for cloud-native deployments.
- 🚀 Plug-and-play experience. Just drop into your Dockerfile or launch script, replacing the
javacommand withjaz. - ☁️ Optimized for Azure environments.
- 🔧 Customizable via environment variables. There are several ways to safely roll out configuration changes.
Public preview
The Azure Command Launcher for Java is now available in public preview! Read the public preview announcement for an introduction to this tool and its benefits.
How it works
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.
Example usage
Instead of tuning your JVM options manually:
JAVA_OPTS="-XX:... several JVM tuning flags"
java $JAVA_OPTS -jar myapp.jar
Use jaz:
jaz -jar myapp.jar
Your application might automatically benefit from:
- Battle-tested defaults for cloud native and container workloads.
- Reduced memory waste in the cloud.
- Better startup and warmup performance.
Installation
The Azure Command Launcher for Java is available for both x64 and arm64 Linux. The supported installation methods are:
- Use a container image with the tool preinstalled.
- Install on Azure Linux.
- Install from the Linux Software Repository for Microsoft Products.
Container images
The tool is included in the container images for the Microsoft Build of OpenJDK. No more setup is necessary.
For example, this Dockerfile uses jaz to run a Java application from a jar file:
# Use any Microsoft Build of OpenJDK base image
FROM mcr.microsoft.com/openjdk/jdk:25-ubuntu
# Add your application.jar
COPY application.jar /application.jar
# Use jaz to launch your Java application
CMD ["jaz", "-jar", "application.jar"]
Install on Azure Linux
Install the jaz package with the following command:
sudo tdnf install jaz
Install from the Linux Software Repository for Microsoft Products
If you've already set up the Linux Software Repository for Microsoft Products, run the appropriate package manager command for your distribution to install the jaz package.
Otherwise, find the instructions that match your Linux distribution in the following list.
Follow the instructions, but install jaz instead of the msopenjdk-25 package.
Supported JVM versions
The Azure Command Launcher for Java supports OpenJDK-based builds, and has been tested with:
- Eclipse Temurin OpenJDK 8 with HotSpot JVM
- Microsoft Build of OpenJDK 11, 17, 21, and 25.
Configuration
The tool can only be configured using environment variables, as any argument to jaz must be compliant with the java launcher.
| Environment variable | Description |
|---|---|
JAZ_HELP |
Set to 1 to print a help message. |
JAZ_PRINT_VERSION |
Set to 1 to print the jaz version to stdout and exit with code 0. |
JAZ_DRY_RUN |
Set to 1 to print the java command that would be executed and exit with code 1. |
JAZ_BYPASS |
Set to 1 to bypass jaz optimization adjustments. Useful when switching back to java is disruptive, for example, in containerized environments. No effect on telemetry. |
JAZ_IGNORE_USER_TUNING |
Set to 1 to trim user-provided tuning args. Allows jaz to tune the JVM in more cases. |
JAZ_EXIT_WITHOUT_FLUSH |
Set to 1 to skip flushing telemetry on exit. Avoids delays (up to 30s) jaz might introduce while flushing data. Might still send some telemetry. |
Roadmap
- ⚙️ JVM configuration profiles
- 📦 AppCDS support
- 🔄 Continuous tuning
- 📊 Telemetry
- 📦 Leyden support
Changelog
Public preview 1: 0.0.0-preview+20251118.1
- Implement RPM and DEB packages.
- Improve garbage collector uncommit adjustments.
- Stop emitting unclear diagnostic output when Java program exits with nonzero code.
- Improve OS signal forwarding to Java process, for example,
SIGTERMandSIGINT.- Stopping a container running a Java application now gives the application time to shut down gracefully.
- Remove the use of
PrintFlagsFinal, improving compatibility with certain Java applications.- Fix calls to
System.console()throwing exceptions. - Fix stdout stream buffering:
jazno longer delays relaying output until it sees a newline character.
- Fix calls to
- Other bug fixes and improvements to internal resilience.
Private preview 2
- Bug fixes.
- Expanded Linux distro compatibility by reducing glibc requirements.
jaznow detects if any manual JVM tuning is present and in such case, it doesn't apply its own adjustments.JAZ_IGNORE_USER_TUNING=1ignores manual JVM tuning if present, and applies jaz's own tuning adjustments instead.- Fixed
PrintFlagsFinaloutput appearing (when not requested) if usingjazwith OpenJDK HotSpot JVM 8.
Private preview 1
- Initial release of Azure Command Launcher for Java.
Telemetry
Azure Command Launcher for Java collects usage data and sends it to Microsoft to help improve our products and services. To learn more, read our privacy statement.