Thanks to visit codestin.com
Credit goes to github.com

Skip to content

This repository contains several small applications. These programs illustrate the capabilities of GraalVM

Notifications You must be signed in to change notification settings

lewurm/graalvm-demos

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Demos @ Uebersetzerbau VO SS2025 at TU Wien

This is an adapted version of https://github.com/graalvm/graalvm-demos and https://github.com/graalvm/graal-languages-demos

Initial Setup

Download GraalVM at

Set JAVA_HOME and PATH accordingly:

$ export JAVA_HOME=$PATH_TO_UNPACKED_GRAALVM
$ export PATH=$JAVA_HOME/bin:$PATH
#!/bin/bash
set -e

export JAVA_HOME=/Users/lewurm/tuwien/graalvm-community-openjdk-24+36.1/Contents/Home/
export PATH=$JAVA_HOME/bin:$PATH

GraalVM with JIT

Run Micronaut example on GraalVM with JIT:

$ cd jvm/hello
$ vim src/main/java/hello/HelloController.java

$ ./mvnw -q package
$ java -jar target/default-0.1.jar
$ java -jar -XX:+PrintCompilation build/libs/hello-0.1-all.jar

$ # check browser on http://localhost:8080/hello

GraalVM with Native Image

Build Micronaut app with Native Image:

$ cd jvm/hello
$ ./mvnw -q clean
$ ./mvnw -q package -Dpackaging=native-image
$ file target/default
$ ./target/default

$ # check browser on http://localhost:8080/hello

Embed GraalPy

Run Micronaut app that embeds GraalPy to use pygal package to render a chart:

$ cd embed
$ ./mvnw -q package mn:run

$ # check browser on http://localhost:8080/java
$ # check browser on http://localhost:8080/python
$ # check browser on http://localhost:8080/mixed

About

This repository contains several small applications. These programs illustrate the capabilities of GraalVM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 51.7%
  • Batchfile 48.3%