Compiling Java into Native Binaries with Graal and Mill

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. firebase-admin-java

    Firebase Admin Java SDK

    "Almost every Java program, library, and framework uses some degree of reflection and dynamic classloading, and so you do have to spend the effort to configure Graal appropriately." -- this is by far the biggest problem with native binary compilation.

    Imagine spending 15+ minutes building an exe, and it stopping at minute 15 because some things needed to be added in the config. Or, after waiting 30 minutes to have the exe ready, it refused to run because of the same problem.

    The issue is we don't know what we don't know. You don't "forget to include something" because you don't know what to include (and even after seeing the error, you still don't lol).

    I just wished all 3rd party libraries put their "include this config to include my lib in your exe", just like OSGi manifest (https://www.ibm.com/docs/en/wasdtfe?topic=overview-osgi-bund...).

    For example, an issue still open for almost 2 years: https://github.com/firebase/firebase-admin-java/issues/800

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. JNA

    Java Native Access

    https://github.com/java-native-access/jna/pull/1608

  4. Graal

    GraalVM compiles Java applications into native executables that start instantly, scale fast, and use fewer compute resources 🚀

    Sorry, I know you weren't asking me, but for this same use case, yes, I've used a GHA build matrix with each OS/arch pair.

    Cosmo/APE support would fix this, and GraalVM already ships with a Musl libc implementation, so it isn't very far off.

    https://github.com/oracle/graal/issues/8350

  5. Avalonia

    Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology

    I don't know why anyone even uses the GUI frameworks from Microsoft these days. WinForms is only good if you need to throw something together quick. Everything else should be Avalonia (https://avaloniaui.net/). Cross platform and does support AOT.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • How to Use the Foreign Function API in Java 22 to Call C Libraries

    11 projects | news.ycombinator.com | 8 May 2024
  • How to access o3-mini model?

    1 project | dev.to | 17 Mar 2025
  • OpenAI Launches Responses API and AI Tools for Custom AI Agent

    1 project | dev.to | 12 Mar 2025
  • Cross-Platform Barcode Scanner with .NET MAUI: Merging Mobile and Desktop Projects

    1 project | dev.to | 9 Mar 2025
  • Elon Musk’s Open-Source Journey: A Catalyst for Innovation

    1 project | dev.to | 5 Mar 2025

Did you know that Java is
the 8th most popular programming language
based on number of references?