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 Java Virtual Machine (JVM) options tailored for cloud environments, jaz 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 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 virtual machine startup command and the JVM. When you launch jaz, it:

  1. Detects the cloud environment (for example, container limits and 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
    • Garbage collector selection and tuning
    • Logging and diagnostics settings as needed

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

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 is tested with the Microsoft Build of OpenJDK and Eclipse Temurin.

Configuration

The jaz command 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.
JAZ_SKIP_PRINT_FLAGS_FINAL Set to 1 to skip passing -XX:+PrintFlagsFinal. Avoids stdout scanning/buffering, 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. To learn more, read our privacy statement.