This repository contains the code for a demo application for GraalVM.
Note: FastR is no longer under active development and is in maintenance mode. The last released version is 22.3.0.
This is a simple Java Spring application that uses GraalVM interoperability to load an R script, which uses typical R packages, lattice
in this case.
-
Download and install GraalVM 22.3.0 with the R language support, using the GraalVM JDK Downloader.
bash <(curl -sL https://get.graalvm.org/jdk) graalvm-ce-java17-22.3.0 -c 'R'
Follow the post-install message.
-
Download or clone the repository and navigate into the
spring-r
directory:git clone https://github.com/graalvm/graalvm-demos
cd graalvm-demos/spring-r
-
Run the example:
mvn spring-boot:run -Dgraalvm.version=22.3.0
Replace "22.1.0" with your version of GraalVM.
When the application is ready, open http://localhost:8080/load
.
Note: It may take 2-3 minutes to generate the plot.