This example demonstrates how to integrate Python on GraalVM with a Java application.
- Download and install the latest GraalVM JDK with Native Image, Python and R support using the GraalVM JDK Downloader:
bash <(curl -sL https://get.graalvm.org/jdk) -c 'python,R'
-
Build application with Gradle:
./gradlew run
-
Navigate to http:https://localhost:8080
You can connect from multiple browsers and chat via websockets. You can use "/" commands to trigger certain interesting functions. Available are:
/img [some string]
Searches for a random image from the internet matching [some string].
/gif [some string]
Searches for a GIF on the internet matching [some string].
/= 1 2 3 4
Echos the arguments
1 2 3 4
./plot 1 1.4 2.6 6.4 25.6 102.4
Plots the points given.
Learn more about GraalVM polyglot capabilities here.