This repository contains a collection of example applications that highlight key features and best practices for working with GraalVM technologies. The demos are organized into categories for easier navigation.
To get started, clone this repository and navigate to the relevant demo directory:
git clone https://github.com/graalvm/graalvm-demos.git
cd graalvm-demos
You will find instructions for running a particular demo in the corresponding README.md file. Some demos may also redirect you to a specific guide on the GraalVM website.
You can find demos, along with how-to guides for GraalJS, GraalPy, and GraalWasm, in separate repositories:
- https://github.com/graalvm/graal-languages-demos/tree/main/graaljs/
- https://github.com/graalvm/graal-languages-demos/tree/main/graalpy/
- https://github.com/graalvm/graal-languages-demos/tree/main/graalwasm/
Example applications showcasing the capabilities of GraalVM Native Image, including performance optimization and configuration tips.
Demos for building native images, including configurations and setup steps for various use cases.
- hello-world -
- build-from-jar -
- build-java-modules -
- build-shared-library -
- build-static-images -
- build-with-js-embedded -
- list-files -
- native-build-tools -
Performance measurement demos for Native Image.
Demos showcasing the building and deployment of native applications to Oracle Cloud Infrastructure (OCI), AWS, and Google Cloud.
- native-aws-fargate -
- native-aws-lambda -
- native-google-cloud-run -
- native-oci-cloud-shell -
- native-oci-container-instances -
- native-oci-generative-ai -
- access-environment-variables -
- configure-with-tracing-agent -
- include-metadata -
- include-resources -
- specify-class-init -
- use-system-properties -
Demos focusing on containerizing native Java applications and following best practices.
Demos showcasing how to monitor native applications using observability and diagnostics tools.
- add-jfr -
- add-jmx -
- add-logging -
- create-heap-dump -
- embed-sbom -
Demos for building microservices ahead of time using frameworks such as Micronaut and Spring Boot.
Demos optimizing native applications for different criteria (runtime and performance tuning, file size, build time, and more).
Demos designed to test and showcase the capabilities of the Graal Just-In-Time (JIT) compiler. These examples focus on evaluating the compiler's performance, including its optimizations for modern Java workloads.
Legacy or blog-related demos, as well as examples involving polyglot capabilities.
The demos are standard Java applications and benchmarks, compatible with any virtual machine capable of running Java. They are tested against the latest GraalVM LTS release and the GraalVM Early Access build using GitHub Actions, with the exception of archived examples. If you come across an issue, please submit it here.
Unless specified otherwise, all code in this repository is licensed under the Universal Permissive License (UPL).