Creating a native executable from a JAR
As we realized during the completion of the previous recipes, building a native image takes way more time than building a regular JVM application. Another important consideration in certain environments is that GraalVM currently doesn’t support cross-platform builds. That means if we need to build an application for Linux, as it’s the most popular platform for server environments, but our development computer is a Windows or macOS computer, we cannot build the application directly. For these reasons, it could be a good choice to keep working with a regular JVM development process and create the native executable in a Continuous Integration (CI) platform. For instance, you can create a GitHub action for the native executable creation. In that way, we maintain the productivity for our development processes, we don’t need to change our development platform, and we can target platforms for our application.
In this recipe,...