Skip to content

Latest commit

 

History

History
62 lines (46 loc) · 1.93 KB

File metadata and controls

62 lines (46 loc) · 1.93 KB

Developing on macOS

Setting up GraalVM for native image builds

Building native images requires GraalVM. The instructions below use SDKMAN! to manage JDK installations — not mandatory, but recommended, as it makes switching JDKs during development easy.

Check the Quarkus documentation for the currently supported GraalVM version, and use it in place of <graalvm-version> below.

  1. Install SDKMAN!:

    curl -s "https://get.sdkman.io" | bash
  2. Install Homebrew:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. Install GraalVM with Homebrew:

    brew install --cask graalvm/tap/<graalvm-version>
  4. Register the GraalVM installation with SDKMAN!:

    sdk install java <graalvm-version>-grl /Library/Java/JavaVirtualMachines/<graalvm-version>/Contents/Home
  5. In the module you want to build, switch to GraalVM and run the native build:

    sdk use java <graalvm-version>-grl
    mvn clean package -Pnative