diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 8baac6b..3446885 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
- java-version: '21.0.2'
+ java-version: '22.0.1'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
@@ -31,7 +31,7 @@ jobs:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
- java-version: '21.0.2'
+ java-version: '22.0.1'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
diff --git a/README.md b/README.md
index 291c1cd..88effc1 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
-# Polyglot Embedding Demo with GraalVM for JDK 21
-Demonstration repository showing polyglot embedding with GraalVM JDK 21 using Maven and Gradle.
+# Polyglot Embedding Demo with GraalVM
+Demonstration repository showing polyglot embedding with GraalVM using Maven and Gradle.
It contains a simple Main and Test class to bootstrap a polyglot embedding project.
-For demonstration showing polyglot native embedding with GraalVM JDK 21 using Maven, see
+For demonstration showing polyglot native embedding with GraalVM using Maven, see
the [Native embedding Maven project](native-embedding/README.md) located in the `native-embedding` subdirectory.
For more details on polyglot embedding please see the docs:
diff --git a/build.gradle.kts b/build.gradle.kts
index 014d8f8..586dc11 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -3,7 +3,7 @@ import java.nio.file.*
plugins {
id("java")
id("application")
- id("org.graalvm.buildtools.native") version "0.9.28"
+ id("org.graalvm.buildtools.native") version "0.10.2"
}
java {
@@ -20,7 +20,7 @@ group = "org.example"
version = "1.0-SNAPSHOT"
description = "embedding"
-var graalVMVersion: String = "23.1.2";
+var graalVMVersion: String = "24.0.1";
dependencies {
implementation("org.graalvm.polyglot:polyglot:$graalVMVersion")
implementation("org.graalvm.polyglot:js:$graalVMVersion")
diff --git a/pom.xml b/pom.xml
index 2df236a..ae68eb9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
- 23.1.2
+ 24.0.1
@@ -156,7 +156,7 @@
org.graalvm.buildtools
native-maven-plugin
- 0.9.28
+ 0.10.2
true
diff --git a/src/main/java/org/example/embedding/Main.java b/src/main/java/org/example/embedding/Main.java
index db0534a..b8d91e6 100644
--- a/src/main/java/org/example/embedding/Main.java
+++ b/src/main/java/org/example/embedding/Main.java
@@ -71,7 +71,7 @@ public static void main(String[] args) throws IOException {
break;
case "wasm":
// with wasm we compute factorial
- context.eval(Source.newBuilder("wasm", Main.class.getResource("factorial.wasm")).build());
+ context.eval(Source.newBuilder("wasm", Main.class.getResource("factorial.wasm")).name("main").build());
Value factorial = context.getBindings("wasm").getMember("main").getMember("fac");
System.out.println("wasm: factorial(20) = " + factorial.execute(20L));
break;