Leveling up Ubuntu for Developers: Java and beyond

One of the historic responsibilities of the Foundations team has been to maintain the major toolchains that are at the center of the Ubuntu ecosystem. These toolchains are not only necessary to build Ubuntu and its packages, they are essential for application developers to be able to develop, build, and deploy their applications on Ubuntu and expect reliable LTS support at all stages.

In the last few years, we have grown our Toolchain team and have expanded our vision to make Ubuntu the best platform to develop and run applications in the cloud, datacenter, and containers directly on the OS and anywhere Ubuntu can run.

This focus allowed us to deliver, release after release, the latest and greatest toolchains for GCC, LLVM, Python, Golang, Rust, .Net, and Java while focusing on each toolchain in a more comprehensive way. In particular, in the more recent Ubuntu 25.04 Plucky Puffin cycle, we have put a specific focus on developer experience across our various toolchains.

We have made available a powerful set of .NET CLI tools with .NET SDK and Runtime via the new .NET snap on the edge channel. This snap also includes a powerful installer tool that gives you the ability to install multiple versions of .NET side-by-side and to receive monthly security and feature updates whenever they become available.

Rust developers can now get access to multiple versioned Rust packages in the archive. And if you want the nightly releases, you can install and use the Rustup snap.

sudo snap install rustup --classic

There are now multiple flavors of the Java Development Kit available on Ubuntu, and you can also easily develop, build, and deploy your Spring and Spring Boot applications. In this post we will cover the progress made to improve the Java developer experience on Ubuntu in detail.

Devpack for Spring

The release of the devpack-for-spring snap in the Plucky Puffin cycle shows how much we love Spring! Spring and Spring Boot are going to be our opinionated frameworks for Java application development on Ubuntu. The devpack-for-spring snap brings to Ubuntu the popular Spring Boot CLI that helps developers quickly bootstrap new Java Spring applications. The snap also enables installing Spring and Spring Boot libraries as content snaps. It offers Maven and Gradle plugins for rockcraft to automate the creation of rocks for Maven and Gradle-based applications respectively.

Overall, the devpack-for-spring snap enables rapid application development by making bootstrapping and iterating easy. The installation is simple:

sudo apt install default-jdk-headless
sudo snap install devpack-for-spring --classic

You may refer to the README for help to get started with devpack-for-spring.

Fast-startup Java

Modern, cloud-native Java backends are, typically, logically divided into microservices. Performance requirements might expect some microservices to start and be available without any measurable delays. Due to startup delays inherent in the Java platform, it is difficult to have applications booting with sub-second delays. We offer two plausible solutions for this problem - OpenJDK CRaC and GraalVM Native Image. Spring Boot has built-in support for both of these Java Development Kits.

OpenJDK CRaC

OpenJDK with Co-ordinated Restore at Checkpoint is a specialized JDK that is augmented with a mechanism to gracefully checkpoint Java applications in a desired state and eventually letting them be started by simply restoring this desired state.

OpenJDK CRaC for versions 17 and 21 are available on Ubuntu since version 24.10. While working with Spring Boot applications created using devpack-for-spring, developers can point to a CRaC-enabled OpenJDK installation and try checkpointing and restoring applications. In this context, checkpoint and restore are semantics defined by utilities like CRIU. Spring Boot supports CRaC starting version 3.2.

To install OpenJDK CRaC version 21, for example:

sudo apt install openjdk-21-crac-jdk-headless

Stay tuned for a follow-up post on checkpointing and restoring Spring Boot applications using OpenJDK CRaC on your developer device or in a container.

GraalVM Native Image

GraalVM lets you compile a Java application into a native executable. The native-image utility ahead-of-time compiles all Java code and packs it into a native executable along with a minimal substrate VM - which is a highly reduced and optimized version of the usual JVM runtime.

Native executables generated by native-image are standalone binaries that need no other JVM libraries for execution. The reduced Java runtime helps applications boot with sub-second delays, consume less compute resources, and scale quickly with the available resources.

Spring Boot 3.2 also supports native compilation. Testing a Spring Boot application as a native image requires you to install the GraalVM snap, do a native compile with Maven, and execute the generated binary executable:

sudo snap install graalvm-jdk --channel=v21
maven -Pnative native:compile

Note that the GraalVM snap is currently available only on amd64 (upstream GraalVM is supported only on amd64 and arm64). A follow-up post helping you get started with using GraalVM JDK is coming soon.

Choosing the right Java Development Kit

Given that Ubuntu now supports three different Java Development Kits - vanilla OpenJDK with Hotspot, OpenJDK with CRaC, and GraalVM JDK - the natural question that arises is: “What is the right JDK for my microservice?” We assert that this is purely an engineering decision and depends on the performance requirements and runtime profile of the microservice.

Firstly, if the microservice is expected to be running for a long time without stringent startup performance requirements, using vanilla OpenJDK Hotspot is still the best choice. The OpenJDK project is quite mature, feature-rich, well-performant over time, stable, and supported by a great community of developers.

However, if your microservice needs to come with a really fast startup speed, you need to explore OpenJDK CRaC and GraalVM. These are not redundant solutions because they serve different use cases.

OpenJDK CRaC is favorable if the microservice is stateful in nature and if the desired performance state can be simulated in a staging environment. We can then checkpoint the microservice in that state and later restore it in the same state, naturally cutting down upon the startup time.

Finally, GraalVM native image is desirable if the microservice is short-lived and stateless. The native image exhibits substantial reduction in the start-up delay. Furthermore, if such an application is highly parallelized, it scales very well with the available compute resources.

Ubuntu for developers documentation

Part of our increased investment on Ubuntu Toolchains, our team has recently started a comprehensive starter documentation for developers on Ubuntu that covers basic installation and setup instructions for each supported toolchain.

It is still early and content is likely to grow rapidly, but feel free to take a sneak peek at our new documentation and provide us with feedback about what you would like to see there!

Read more about this new documentation set in New documentation: Ubuntu for Developers.

One more thing

image

Zig (programming language) - Wikipedia

While Rust is pretty hot right now around Ubuntu, we thought it would be great to make room for another exciting new toolchain in Ubuntu!

With a growing community and increasing adoption in areas like game development, tooling, and OS-level programming, Zig is a modern systems-programming language focused on performance, safety, and direct control over hardware without hidden abstractions.

During the 25.10 cycle, we will work to integrate Zig as a first-class toolchain for Ubuntu! Work on this should start very soon!

That’s it for now, folks!

While .NET and Java are the major application toolchains supported on Ubuntu and the ones we have been able to progress the most, we are planning to afford the same level of focus and integration for the others. Expect to see developer experience improvements across the board soon. Stay tuned!

Special thanks to @samirkam and his team for the outstanding toolchains support on Ubuntu and for an exciting roadmap ahead!

5 Likes