GraalVM is here!

graalvm 1

Good news everone, we are all super happy to tell you our JVM image has been updated substantialy. We now support OpenJDK 12 and GraalVM CE!

If you follow what's going on in the JVM space you have seen there is more and more choices available when it comes to running JVM-based applications. And we now support GraalVM CE. If you have no idea what it is, the best, simple explaination can be found on Julien Ponge's medium: https://medium.com/@jponge/the-graalvm-frenzy-f54257f5932c

And as he explains that way better than I, I will jump into the how to run a GraalVM application on Clever Cloud.

We first need to find an appropriate Hello world project. Being a Ratpack fan I looked on Github and found this: https://github.com/wololock/ratpack-graalvm-demo

This is a gradle project with a script to build a native image, basically a binary with everything needed to run the application. No need for a JVM. So this is what we are going to build.

First to create the application, if you have clever-tools you can run: clever create --type gradle --plan M graalPack Now we need to setup the right environment variables.

clever env set CC_JAVA_VERSION graalvm-ce  # Select GraalVN CE as Java Version
clever env set GRADLE_DEPLOY_GOAL shadowJar # Specify the gradle goal, here we want to build a full jar.
clever env set CC_PRE_RUN_HOOK ./build-native-image.sh # run the native image build
clever env set CC_RUN_COMMAND ./ratpack-graalvm-demo # specify the path of the native executable

I have modified a couple of things to make sure it would work smoothly on Clever Cloud. First thing, always define a rootProject name because gradle will pick the containing folder, which in our case the random application id, and generate the jar name with it. So you can't really use it in a script. Here's one liner to do it: echo 'rootProject.name = "ratpack-graalvm-demo"' > settings.gradle

The script already run gradlew shadowJar. I have removed it since this step is already made by Clever Cloud. Of course you could run it locally and only push the executable. This would also work.

Don't forget to add these changes to your git repository: git add settings.gradle build-native-image.sh && git commit -m"cleverify"

We are building a native image and this can be a super greedy process in terms of memory. To make sure we have some headroom we are going to use a bigger scaler. Run clever scale --flavor L to get the proper size. This might depend on the build you are running. Static analysis is not cheap. Later this week we'll show you how to proceed differently with a new CI project 🙂 But for now we'll stick to a bigger scaler.

Now all you have to do is run clever deploy and you will have your native image running on Clever Cloud. Benefits are mostly a reduced memory footprint and better performances at cold start. You can find more informations about this on the following blog post Ratpack on GraalVM – how to start?.

In the next days you can expect support for cool GraalVM features like the support for TruffelRuby or FastR). Let us know if you have any questions in the comments below!

Blog

À lire également

Cloud modernisation: how to align governance and operations without adding complexity

European organisations are managing increasingly heterogeneous environments: legacy applications, cloud-native services, multi-cloud setups and regulatory constraints are accumulating within information systems rarely designed to handle such diversity.
Engineering Event Guests

Clever Cloud launches Clever Kubernetes Engine (CKE) in public beta on April 27, 2026

Previewed at Devoxx starting April 22, CKE is the culmination of two years of R&D built around a complete reimplementation of Kubernetes.
Company Engineering Press

The DEEP, OVHcloud and Clever Cloud consortium selected to deliver sovereign cloud services for European institutions

Paris – April 17, 2026 – The consortium composed of DEEP by POST Luxembourg Group, OVHcloud and Clever Cloud today announces its selection by the European Commission as part of a major procurement framework to provide sovereign cloud services to the institutions, bodies and agencies of the European Union. This contract, with a ceiling of €180 million over six years, marks a significant milestone in the concrete implementation of Europe’s digital sovereignty strategy.
Company