Hacker News new | ask | show | jobs
by pjmlp 246 days ago
Only for those that don't know how to use AOT compilation tools for Java and C#.
2 comments

Compiling Java AOT doesn’t obviate the need for the JVM.

At least not for Graal.

https://stackoverflow.com/questions/75316542/why-do-i-need-j...

Because it is user problem, instead of compiling with native image, they produced a shared library out of the Jar.

As you can see, it has nothing to do with that Stack Overflow question,

https://www.graalvm.org/jdk25/reference-manual/native-image/

... That post you linked was from two years ago, discussing JEP 295, which was delivered eight years ago. Graal-based AOT has evolved a lot ever since. And the answer even explicitly recommended using native images:

> I think what you actually want to do, is to compile a native image of your program. This would include all the implications like garbage collection from the JVM into the executable.

And it is this "native image" that all the comments above in this thread have been discussing, not JEP 295. (And Graal-based AOT in native images does remove the need to bundle a whole JRE.)

GraalVM indeed do wonders wrt startup times and in providing a single binary you can call.
Open J9 as well.

Then there are all the others that used to be commercial like ExcelsiorJET, or surviving ones like PTC and Aicas.