Demonstration repository showing polyglot embedding with GraalVM JDK 21 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
the Native embedding Maven project located in the native-embedding subdirectory.
For more details on polyglot embedding please see the docs: https://www.graalvm.org/latest/reference-manual/embed-languages/
Download GraalVM and point the JAVA_HOME environment variable to it.
Download Maven or import as Maven project into your IDE.
mvn packagebuild using javacmvn testto run the testsmvn exec:execto run the Main applicationmvn -Pnative packageto build a native-image
Please see the pom.xml file for further details on the configuration.
Download Gradle or import as Maven project into your IDE.
gradle buildbuild using javacgradle runto run the Main applicationgradle testto run the testsgradle nativeCompileto build a native-imagegradle nativeRunto run the native image
Please see the build.gradle.kts file for further details on the configuration.