Share via


Azure Command Launcher for Java (Private Preview)

The Azure Command Launcher for Java (jaz) is a lightweight utility that simplifies how Java developers run their applications on Azure. By intelligently applying JVM flags tailored for cloud environments, it 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 VMs

Key Features

  • 🛠 Auto-tunes JVM flags for cloud-native deployments
  • 🚀 Plug-and-play experience. Just drop into your Dockerfile or launch script, replacing the java command with jaz
  • ☁️ Optimized for Azure environments. If you prefer jaz JVM configuration recommendations, remove all JVM tuning flags from your existing command launcher
  • 🔧 Customizable via environment variables

Private Preview

The tool is available for download by customers who applied for our Private Preview. You can submit your request to join the Private Preview.

How it works

jaz sits between your container or VM startup command and the JVM. It will:

  1. Detect the cloud environment (e.g., container limits, available memory)
  2. Analyzes the workload type and selects best-fit JVM options
  3. Launches the Java process with optimized flags, such as:
    • Heap sizing
    • GC selection and tuning
    • Logging and diagnostics settings as needed

Example Usage

Instead of this:

JAVA_OPTS="-XX:... several JVM tuning flags"
java $JAVA_OPTS -jar myapp.jar

Use:

jaz -jar myapp.jar

Your application may automatically benefit from:

  • Battle-tested defaults for cloud native and container workloads
  • Reduced memory waste in the Cloud
  • Better startup and warmup performance

Installation

While in Private Preview, the software is distributed as a tar.gz file, with binaries for x64 and arm64, and can be easily installed in container images.

FROM mcr.microsoft.com/openjdk/jdk:21-ubuntu

# Install jaz
COPY jaz-versionstring.tar.gz /tmp/
RUN tar -xzf /tmp/jaz-versionstring.tar.gz -C / && mv /jaz*/jaz /usr/bin

# Add your application.jar
COPY application.jar /application.jar

CMD ["jaz", "-jar", "application.jar"]

Supported JVM versions

jaz supports OpenJDK HotSpot JVM versions 8, 11, 17, and 21.

jaz has been tested with the Microsoft Build of OpenJDK and Eclipse Temurin.

Configuration

The jaz command may 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, e.g., in containerized environments. No effect on telemetry.
JAZ_EXIT_WITHOUT_FLUSH Set to 1 to skip flushing telemetry on exit. Avoids delays (up to 30s) jaz may introduce while flushing data. May still send some telemetry.
JAZ_SKIP_PRINT_FLAGS_FINAL Set to 1 to skip passing -XX:+PrintFlagsFinal. Avoids scanning/buffering stdout which jaz does to determine final JVM flags.
JAZ_ALWAYS_FILTER_PRINT_FLAGS_FINAL_STDOUT Set to 1 to always filter out PrintFlagsFinal from stdout. Normally jaz filters only if it detects the flag was passed. Ignored if JAZ_SKIP_PRINT_FLAGS_FINAL is set.

Roadmap

  • 📦 Linux packages (DEB/RPM) and container images
  • ⚙️ JVM Configuration Profiles
  • 📦 AppCDS Support
  • 📦 Leyden Support
  • 🔄 Continuous Tuning
  • 📊 Telemetry shared through Prometheus

Telemetry

Azure Command Launcher for Java collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more.