Talk

Projects such as LangChain4j, Spring AI, and llama3.java got the Java community very excited about AI in the last year. The Python ecosystem also provides many powerful packages for data science, machine learning, and more. Wouldn't it be cool if you, as a Java developer, could benefit from this, too?
In this interactive talk, we show how you can use GraalPy, the Python runtime built by the GraalVM team, to embed Python in your Java applications. We'll start simple with adding GraalPy as a dependency to a minimal Java project and show how easy it is to get started and evaluate Python code. We then show how the Maven and Gradle plugins for GraalPy can help install additional Python packages. We continue with more live demos that illustrate different use cases, such as: a Micronaut application that uses Hugging Face transformers, an AWT application that visualizes data with Python (running on JBang!), a Jupyter kernel that lets you mix Java and Python in the same notebook, and a Java application scripted with Python.
We'll also look beyond Python and provide examples of how to embed other languages. You can, for example, also use JavaScript for server-side rendering or scripting of Java applications. You can even compile user-defined functions written in C++ or Rust, compile them to WebAssembly, and embed them in Java.
Come and join us to learn more and don't be shy to ask questions!
Fabio Niephaus
Oracle Labs
Fabio Niephaus is a researcher on the GraalVM project at Oracle Labs and focuses on the developer experience and tools for GraalVM. His research interests include developer tools, programming languages, and virtual machines.
Thomas Wuerthinger
Oracle
Thomas Wuerthinger is a Vice President at Oracle Labs leading programming language implementation teams for languages including Java, JavaScript, Ruby, and R. He is the architect of the Graal compiler and the Truffle self-optimizing runtime system. Previously, he worked on the Crankshaft optimizing compiler of V8 at Google, and the Maxine research virtual machine at Sun Microsystems. He received a PhD degree from JKU Linz for his research about dynamic code evolution.